Make warnings fail regression tests, fix warnings.

This commit is contained in:
sawinglogz 2019-05-08 17:06:17 -04:00
parent 609e02b2c5
commit e67aae78cf
4 changed files with 10 additions and 8 deletions

View File

@ -1142,7 +1142,8 @@ void gAHIChart::customCalc(Day *day, QVector<SummaryChartSlice> &list)
case 1:
calc->wavg_sum += value;
calc->divisor += hours;
default:
break;
case 2:
calc->avg_sum += value;
calc->cnt++;
break;

View File

@ -802,7 +802,8 @@ QByteArray gUncompress(const QByteArray & data)
switch (ret) {
case Z_NEED_DICT:
ret = Z_DATA_ERROR; // and fall through
ret = Z_DATA_ERROR;
// fall through
case Z_DATA_ERROR:
case Z_MEM_ERROR:
Q_UNUSED(ret)

View File

@ -2350,10 +2350,10 @@ void Daily::updateCube()
}
void Daily::on_toggleGraphs_clicked(bool checked)
void Daily::on_toggleGraphs_clicked(bool /*checked*/)
{
QString s;
QIcon *icon=checked ? icon_off : icon_on;
//QIcon *icon=checked ? icon_off : icon_on;
if (ui->graphCombo == nullptr )
qDebug() << "ToggleGraphs clicked with null graphCombo ptr";
else
@ -2414,10 +2414,10 @@ void Daily::on_eventsCombo_activated(int index)
GraphView->redraw();
}
void Daily::on_toggleEvents_clicked(bool checked)
void Daily::on_toggleEvents_clicked(bool /*checked*/)
{
QString s;
QIcon *icon=checked ? icon_on : icon_off;
//QIcon *icon=checked ? icon_on : icon_off;
if (ui->toggleEvents == nullptr )
qDebug() << "ToggleEvents clicked with null toggleEvents ptr";

View File

@ -443,8 +443,8 @@ test {
CONFIG += console debug
CONFIG -= app_bundle
!win32 { # add memory checking on Linux and macOS test builds
QMAKE_CFLAGS += -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_CXXFLAGS += -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_CFLAGS += -Werror -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_CXXFLAGS += -Werror -fsanitize=address -fno-omit-frame-pointer -fno-common -fsanitize-address-use-after-scope
QMAKE_LFLAGS += -fsanitize=address
}