interferences-at / mpop

Software for the MPOP project
2 stars 1 forks source link

(service) Fix warnings when building the service #514

Open aalex opened 1 year ago

aalex commented 1 year ago
facade.cpp: In member function ‘float Facade::getRandomValueByTotalAns()’:
facade.cpp:1215:12: warning: ‘totalAns’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1215 |     return totalAns;
      |            ^~~~~~~~
facade.cpp: In member function ‘float Facade::getRandomValueByAnsLastHour()’:
facade.cpp:1243:12: warning: ‘totalAnsLstHour’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1243 |     return totalAnsLstHour;
      |            ^~~~~~~~~~~~~~~
facade.cpp: In member function ‘float Facade::getRandomValueByAvgofAllAns()’:
facade.cpp:1270:12: warning: ‘avgOfAns’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1270 |     return avgOfAns;
      |            ^~~~~~~~
facade.cpp: In member function ‘float Facade::getRandomValueByTotalVisitors()’:
facade.cpp:1296:12: warning: ‘totalVisitor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1296 |     return totalVisitor;
      |            ^~~~~~~~~~~~
facade.cpp: In member function ‘float Facade::getRandomValueByTodaysVisitors()’:
facade.cpp:1323:12: warning: ‘todaysVisitor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1323 |     return todaysVisitor;
      |            ^~~~~~~~~~~~~
../mpop_service/facade.cpp: In member function ‘float Facade::getRandomValueByTotalAns()’:
../mpop_service/facade.cpp:1215:12: warning: ‘totalAns’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1215 |     return totalAns;
      |            ^~~~~~~~
../mpop_service/facade.cpp: In member function ‘float Facade::getRandomValueByAnsLastHour()’:
../mpop_service/facade.cpp:1243:12: warning: ‘totalAnsLstHour’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1243 |     return totalAnsLstHour;
      |            ^~~~~~~~~~~~~~~
../mpop_service/facade.cpp: In member function ‘float Facade::getRandomValueByAvgofAllAns()’:
../mpop_service/facade.cpp:1270:12: warning: ‘avgOfAns’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1270 |     return avgOfAns;
      |            ^~~~~~~~
../mpop_service/facade.cpp: In member function ‘float Facade::getRandomValueByTotalVisitors()’:
../mpop_service/facade.cpp:1296:12: warning: ‘totalVisitor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1296 |     return totalVisitor;
      |            ^~~~~~~~~~~~
../mpop_service/facade.cpp: In member function ‘float Facade::getRandomValueByTodaysVisitors()’:
../mpop_service/facade.cpp:1323:12: warning: ‘todaysVisitor’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 1323 |     return todaysVisitor;
      |            ^~~~~~~~~~~~~
TestMpopService.cpp: In member function ‘void TestMpopService::test_22_getAnswerByAge()’:
TestMpopService.cpp:459:22: warning: unused variable ‘Test_QUESTION_05_AVG’ [-Wunused-variable]
  459 |     static const int Test_QUESTION_05_AVG = 35;
      |                      ^~~~~~~~~~~~~~~~~~~~