Skip to content

ODR issues

Heya,

Some new ODR issues have popped up.

SleepLib/loader_plugins/resvent_loader.cpp:180:8: error: type ‘struct UsageData’ violates the C++ One Definition Rule [-Werror=odr]
  180 | struct UsageData {
      |        ^
statistics.cpp:945:8: note: a different type is defined in another translation unit
  945 | struct UsageData {
      |        ^
SleepLib/loader_plugins/resvent_loader.cpp:181:13: note: the first difference of corresponding definitions is field ‘number’
  181 |     QString number{};
      |             ^
statistics.cpp:949:11: note: a field with different name is defined in another translation unit
  949 |     QDate date;
      |           ^
lto1: all warnings being treated as errors
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.