Closed ferdymercury closed 2 years ago
About this one:
warning: Value stored to 'include_all' is never read
It's just the result of a TODO, it will fix by itself at some point: https://github.com/lamyj/odil/blob/dc8d063d8ecf1fa787a3e2de7f5b9a9574fa1105/src/odil/webservices/QIDORSRequest.cpp#L372-L377
These warnings originate in Boost as far as I can see:
src/odil/dul/StateMachine.cpp:143:5: warning: Using assign operator but class boost::posix_time::time_duration has copy-ctor but no assign operator [clazy-rule-of-two-soft]
src/odil/dul/Transport.cpp:82:5: warning: Using assign operator but class boost::posix_time::time_duration has copy-ctor but no assign operator [clazy-rule-of-two-soft]
The source is here: https://github.com/boostorg/date_time/blob/develop/include/boost/date_time/posix_time/posix_time_duration.hpp
The strcpy
/strcat
warnings do make sense, but fixing them may require changing some functions, such as roundat()
, by passing the buffer length in addition to the buffer itself:
https://github.com/lamyj/odil/blob/dc8d063d8ecf1fa787a3e2de7f5b9a9574fa1105/src/odil/write_ds.cpp#L81-L90
That said, at first glance, the calling code does seem to be checking buffer sizes.
By the way, there's a bug in clang itself, it should also warn to replace sprintf()
with snprintf()
:
https://github.com/lamyj/odil/blob/dc8d063d8ecf1fa787a3e2de7f5b9a9574fa1105/src/odil/write_ds.cpp#L100-L105
Thank you @ferdymercury and @DimitriPapadopoulos for the report and proposed fixes
Some warnings are reported by clang: