Skip to content

Compiler warnings: -Wshift-count-overflow

Summary

Build generates warnings. This issue is about -Wshift-count-overflow.

Steps to reproduce

Follow the build instructions.

What is the current bug behavior?

Warnings are generated, uncovering what's likely a genuine bug.

What is the expected correct behavior?

Build succeeds without warning.

Relevant logs and/or screenshots

../gemhardware/managers/src/amc13/AMC13Manager.cpp: In member function ‘xoap::MessageReference gem::hw::amc13::AMC13Manager::restartAMC13Counts(xoap::MessageReference)’:
../gemhardware/managers/src/amc13/AMC13Manager.cpp:441:95: warning: left shift count >= width of type [-Wshift-count-overflow]
     m_updatedL1ACount = ((p_amc13->read(::amc13::AMC13::T1, "STATUS.GENERAL.L1A_COUNT_HI") << 32) | p_amc13->read(::amc13::AMC13::T1, "STATUS.GENERAL.L1A_COUNT_LO"));
                                                                                               ^~

Environment

  • Version used: develop
  • Operation System: gem904daq04