second pass over compilation warnings

This commit is contained in:
csoler 2016-06-05 11:05:52 -04:00
parent 927f782bef
commit f55b283887
17 changed files with 28 additions and 28 deletions

View File

@ -316,7 +316,7 @@ std::string ApiServer::handleRequest(Request &request)
task = mRouter.handleRequest(request, resp); task = mRouter.handleRequest(request, resp);
} }
time_t start = time(NULL); //time_t start = time(NULL);
bool morework = true; bool morework = true;
while(task && morework) while(task && morework)
{ {

View File

@ -424,7 +424,7 @@ static void sendMessage(MHD_Connection *connection, unsigned int status, std::st
static std::string escape_html(std::string in) static std::string escape_html(std::string in)
{ {
std::string out; std::string out;
for(int i = 0; i < in.size(); i++) for(uint32_t i = 0; i < in.size(); i++)
{ {
char a = (in[i]&0xF0)>>4; char a = (in[i]&0xF0)>>4;
a = a < 10? a+'0': a-10+'A'; a = a < 10? a+'0': a-10+'A';

View File

@ -72,7 +72,7 @@ PeersHandler::~PeersHandler()
mStateTokenServer->unregisterTickClient(this); mStateTokenServer->unregisterTickClient(this);
} }
void PeersHandler::notifyListChange(int list, int type) void PeersHandler::notifyListChange(int list, int /* type */)
{ {
RsStackMutex stack(mMtx); /********** STACK LOCKED MTX ******/ RsStackMutex stack(mMtx); /********** STACK LOCKED MTX ******/
if(list == NOTIFY_LIST_FRIENDS) if(list == NOTIFY_LIST_FRIENDS)

View File

@ -525,7 +525,7 @@ std::string SerializeValue(const Value& v)
// json expets decimal points, so replace all commas with decimal points // json expets decimal points, so replace all commas with decimal points
if(v.GetType() == FloatVal || v.GetType() == DoubleVal) if(v.GetType() == FloatVal || v.GetType() == DoubleVal)
{ {
for(int i = 0; i < str.size(); i++) for(unsigned int i = 0; i < str.size(); i++)
if(str[i] == ',') if(str[i] == ',')
str[i] = '.'; str[i] = '.';
} }

View File

@ -464,7 +464,7 @@ void PostedListWidget::clearPosts()
mPosts.clear(); mPosts.clear();
} }
bool PostedListWidget::navigatePostItem(const RsGxsMessageId &msgId) bool PostedListWidget::navigatePostItem(const RsGxsMessageId & /*msgId*/)
{ {
//TODO //TODO
return false; return false;

View File

@ -293,7 +293,7 @@ PictureFlowState::PictureFlowState():
PictureFlowState::~PictureFlowState() PictureFlowState::~PictureFlowState()
{ {
for(uint i=0;i<slideImages.size();++i) for(int i=0;i<slideImages.size();++i)
delete slideImages[i] ; delete slideImages[i] ;
slideImages.clear() ; slideImages.clear() ;
} }
@ -1104,7 +1104,7 @@ void PictureFlow::setCenterIndex(int index)
void PictureFlow::clear() void PictureFlow::clear()
{ {
for(uint i=0;i<d->state->slideImages.size();++i) for(int i=0;i<d->state->slideImages.size();++i)
delete d->state->slideImages[i] ; delete d->state->slideImages[i] ;
d->state->slideImages.clear() ; d->state->slideImages.clear() ;

View File

@ -332,10 +332,10 @@ void RSGraphWidget::paintEvent(QPaintEvent *)
_painter->end(); _painter->end();
} }
QSizeF RSGraphWidget::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const QSizeF RSGraphWidget::sizeHint(Qt::SizeHint which, const QSizeF& /* constraint */) const
{ {
float FS = QFontMetricsF(font()).height(); float FS = QFontMetricsF(font()).height();
float fact = FS/14.0 ; //float fact = FS/14.0 ;
switch(which) switch(which)
{ {
@ -408,7 +408,7 @@ void RSGraphWidget::pointsFromData(const std::vector<QPointF>& values,QVector<QP
int x = _rec.width(); int x = _rec.width();
int y = _rec.height(); int y = _rec.height();
float time_step = 1.0f ; // number of seconds per pixel //float time_step = 1.0f ; // number of seconds per pixel
/* Translate all data points to points on the graph frame */ /* Translate all data points to points on the graph frame */
@ -522,7 +522,7 @@ void RSGraphWidget::paintLine(const QVector<QPointF>& points, QColor color, Qt::
void RSGraphWidget::paintTotals() void RSGraphWidget::paintTotals()
{ {
float FS = QFontMetricsF(font()).height(); float FS = QFontMetricsF(font()).height();
float fact = FS/14.0 ; //float fact = FS/14.0 ;
//int x = SCALE_WIDTH*fact + FS, y = 0; //int x = SCALE_WIDTH*fact + FS, y = 0;
int rowHeight = FS; int rowHeight = FS;
@ -593,12 +593,12 @@ void RSGraphWidget::paintScale2()
float FS = QFontMetricsF(font()).height(); float FS = QFontMetricsF(font()).height();
float fact = FS/14.0 ; float fact = FS/14.0 ;
int bottom = _rec.height(); //int bottom = _rec.height();
static const int npix = 100*fact ; static const int npix = 100*fact ;
for(int i=_rec.width();i>SCALE_WIDTH*fact;i-=npix) for(int i=_rec.width();i>SCALE_WIDTH*fact;i-=npix)
{ {
qreal pos = bottom - FS; //qreal pos = bottom - FS;
int seconds = (_rec.width()-i)/_time_scale ; // pixels / (pixels per second) => seconds int seconds = (_rec.width()-i)/_time_scale ; // pixels / (pixels per second) => seconds
QString text = QString::number(seconds)+ " secs"; QString text = QString::number(seconds)+ " secs";

View File

@ -340,7 +340,7 @@ void PGPKeyDialog::applyDialog()
} }
//check the GPG trustlvl //check the GPG trustlvl
if(ui.trustlevel_CB->currentIndex() != detail.trustLvl) if(ui.trustlevel_CB->currentIndex() != (int)detail.trustLvl)
rsPeers->trustGPGCertificate(pgpId, ui.trustlevel_CB->currentIndex()); rsPeers->trustGPGCertificate(pgpId, ui.trustlevel_CB->currentIndex());
//setServiceFlags() ; //setServiceFlags() ;

View File

@ -1534,7 +1534,7 @@ QString MessageComposer::getRecipientEmailAddress(const RsGxsId& id,const RsIden
return (QString("%2 <")+tr("Distant identity:")+" %2@%1>").arg(QString::fromStdString(id.toStdString())).arg(QString::fromUtf8(detail.mNickname.c_str())) ; return (QString("%2 <")+tr("Distant identity:")+" %2@%1>").arg(QString::fromStdString(id.toStdString())).arg(QString::fromUtf8(detail.mNickname.c_str())) ;
} }
QString MessageComposer::getRecipientEmailAddress(const RsPeerId& id,const RsPeerDetails& detail) QString MessageComposer::getRecipientEmailAddress(const RsPeerId& /* id */,const RsPeerDetails& detail)
{ {
QString location_name = detail.location.empty()?tr("[Missing]"):QString::fromUtf8(detail.location.c_str()) ; QString location_name = detail.location.empty()?tr("[Missing]"):QString::fromUtf8(detail.location.c_str()) ;

View File

@ -496,7 +496,7 @@ void ServerPage::ipFilterContextMenu(const QPoint& point)
if(item == NULL) if(item == NULL)
return ; return ;
bool status = item->data(Qt::UserRole).toBool(); //bool status = item->data(Qt::UserRole).toBool();
uint32_t reason = ui.filteredIpsTable->item(row,COLUMN_REASON)->data(Qt::UserRole).toUInt(); uint32_t reason = ui.filteredIpsTable->item(row,COLUMN_REASON)->data(Qt::UserRole).toUInt();

View File

@ -411,7 +411,7 @@ void BWGraphSource::setSelector(int selector_type,int graph_type,const std::stri
{ {
if(graph_type == GRAPH_TYPE_SINGLE) if(graph_type == GRAPH_TYPE_SINGLE)
{ {
bool ok = false ; //bool ok = false ;
int tmp = QString::fromStdString(selector_client_string).toInt() ; int tmp = QString::fromStdString(selector_client_string).toInt() ;
if(tmp > 0 && tmp < 0x10000) if(tmp > 0 && tmp < 0x10000)

View File

@ -62,7 +62,7 @@ void BandwidthStatsWidget::updateComboBoxes()
// Setup button/combobox info // Setup button/combobox info
uint32_t indx = 2 ; int indx = 2 ;
//RsPeerDetails details ; //RsPeerDetails details ;
RsPeerId current_friend_id(ui.friend_CB->itemData(ui.friend_CB->currentIndex()).toString().toStdString()) ; RsPeerId current_friend_id(ui.friend_CB->itemData(ui.friend_CB->currentIndex()).toString().toStdString()) ;

View File

@ -171,7 +171,7 @@ void BWListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
QSize BWListDelegate::sizeHint(const QStyleOptionViewItem & option/*option*/, const QModelIndex & index) const QSize BWListDelegate::sizeHint(const QStyleOptionViewItem & option/*option*/, const QModelIndex & index) const
{ {
float FS = QFontMetricsF(option.font).height(); float FS = QFontMetricsF(option.font).height();
float fact = FS/14.0 ; //float fact = FS/14.0 ;
float w = QFontMetricsF(option.font).width(index.data(Qt::DisplayRole).toString()); float w = QFontMetricsF(option.font).width(index.data(Qt::DisplayRole).toString());
@ -187,8 +187,8 @@ BwCtrlWindow::BwCtrlWindow(QWidget *parent)
BWDelegate = new BWListDelegate(); BWDelegate = new BWListDelegate();
bwTreeWidget->setItemDelegate(BWDelegate); bwTreeWidget->setItemDelegate(BWDelegate);
float FS = QFontMetricsF(font()).height(); //float FS = QFontMetricsF(font()).height();
float fact = FS/14.0 ; //float fact = FS/14.0 ;
/* Set header resize modes and initial section sizes Peer TreeView*/ /* Set header resize modes and initial section sizes Peer TreeView*/
QHeaderView * _header = bwTreeWidget->header () ; QHeaderView * _header = bwTreeWidget->header () ;

View File

@ -279,7 +279,7 @@ void DhtWindow::updateNetStatus()
void DhtWindow::updateNetPeers() void DhtWindow::updateNetPeers()
{ {
QTreeWidget *peerTreeWidget = ui.peerTreeWidget; //QTreeWidget *peerTreeWidget = ui.peerTreeWidget;
std::list<RsPeerId> peerIds; std::list<RsPeerId> peerIds;
std::list<RsPeerId>::iterator it; std::list<RsPeerId>::iterator it;
@ -654,7 +654,7 @@ void DhtWindow::updateDhtPeers()
} }
} }
QTreeWidget *dhtTreeWidget = ui.dhtTreeWidget; //QTreeWidget *dhtTreeWidget = ui.dhtTreeWidget;
ui.dhtTreeWidget->clear(); ui.dhtTreeWidget->clear();

View File

@ -324,7 +324,7 @@ void GlobalRouterStatisticsWidget::updateContent()
// oy += celly ; // oy += celly ;
// oy += celly ; // oy += celly ;
static const int MaxKeySize = 20*fact ; //static const int MaxKeySize = 20*fact ;
painter.setFont(monospace_f) ; painter.setFont(monospace_f) ;
int n=0; int n=0;

View File

@ -34,7 +34,7 @@
#include "gui/settings/rsharesettings.h" #include "gui/settings/rsharesettings.h"
RttStatistics::RttStatistics(QWidget *parent) RttStatistics::RttStatistics(QWidget * /*parent*/)
{ {
setupUi(this) ; setupUi(this) ;

View File

@ -74,7 +74,7 @@ char *getpass (const char *prompt)
} }
#endif #endif
void NotifyTxt::notifyErrorMsg(int list, int type, std::string msg) void NotifyTxt::notifyErrorMsg(int /* list */, int /* type */, std::string /* msg */)
{ {
return; return;
} }
@ -101,7 +101,7 @@ bool NotifyTxt::askForPluginConfirmation(const std::string& plugin_file_name, co
return a == 'y' ; return a == 'y' ;
} }
bool NotifyTxt::askForPassword(const std::string& question, bool prev_is_bad, std::string& password,bool& cancel) bool NotifyTxt::askForPassword(const std::string& question, bool /* prev_is_bad */, std::string& password,bool& cancel)
{ {
std::string question1="Please enter your PGP password for key:\n " + question + " :"; std::string question1="Please enter your PGP password for key:\n " + question + " :";
char *passwd = getpass(question1.c_str()) ; char *passwd = getpass(question1.c_str()) ;
@ -112,7 +112,7 @@ bool NotifyTxt::askForPassword(const std::string& question, bool prev_is_bad, st
} }
void NotifyTxt::notifyListChange(int list, int type) void NotifyTxt::notifyListChange(int list, int /* type */)
{ {
//std::cerr << "NotifyTxt::notifyListChange()" << std::endl; //std::cerr << "NotifyTxt::notifyListChange()" << std::endl;
switch(list) switch(list)