berthubert / galmon

galileo open source monitoring
GNU General Public License v3.0
198 stars 53 forks source link

Compiling with clang 10 on OpenBSD produces a few warnings #136

Open omoerbeek opened 3 years ago

omoerbeek commented 3 years ago
rtcm.cc:9:10: warning: destination for this 'memset' call is a pointer to dynamic class 'GalileoMessage'; vtable
      pointer will be overwritten [-Wdynamic-class-memaccess]
  memset(&d_gm, 0, sizeof(d_gm));
  ~~~~~~ ^
rtcm.cc:9:10: note: explicitly cast the pointer to silence this warning
  memset(&d_gm, 0, sizeof(d_gm));
         ^
         (void*)

struct InfluxPusher
^
./navparse.hh:26:1: note: did you mean struct here?
class InfluxPusher;
^~~~~
struct

In file included from ubxtool.cc:36:
./nmmsender.hh:40:31: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
        d_thread.emplace_back(std::move(std::make_unique<std::thread>(&NMMSender::sendTCPThread, this, d.get())));
                              ^
./nmmsender.hh:40:31: note: remove std::move call here
        d_thread.emplace_back(std::move(std::make_unique<std::thread>(&NMMSender::sendTCPThread, this, d.get())));

./rinex.hh:37:10: warning: private field 'd_time' is not used [-Wunused-private-field]
  time_t d_time{0};

rinreport.cc:83:10: warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
  return std::move(stat);
         ^
rinreport.cc:83:10: note: remove std::move call here
  return std::move(stat);
         ^~~~~~~~~~    ~

Sorry, no time to look at this now...