Ubuntu artful and bionic warn about printing an uint16_t formatted as "%2X", taking 2 to 4 bytes #862
Labels
CI
Entries related to continuous integration infrastructure (historically also recipes like Makefiles)
portability
We want NUT to build and run everywhere possible
https://github.com/networkupstools/nut/blob/master/drivers/al175.c#L400
http://buildbot.networkupstools.org/public/nut/builders/Ubuntu-artful-x64/builds/240/steps/compile/logs/warnings%20%284%29 and http://buildbot.networkupstools.org/public/nut/builders/Ubuntu-bionic-x64/builds/185/steps/compile/logs/warnings%20%281%29 :
I am in favor of finding a way to silence this one warning, unless someone comes up with reasoning why it makes sense. For now, PR #858 would add a comment here that the warning exists in a rare test case, but seems bogus.
Probably bumping the target buffer size might avoid this like in other such cases, but I really wonder if there is a way for explicit
%2X
of an explicitly 16-bit variable to print more than two data bytes?.. Do some distros/compilers account for wide chars for example? Then we'd have a lot more such warnings on that platform, I suppose...The text was updated successfully, but these errors were encountered: