Fix uninitialized build warnings#6283
Conversation
|
Thanks for the pull request. Which compiler do you use when you see the warnings? Could you post the full warning messages? Do you know why the warnings occur? In the first two files, initializing with zeros seems more like silencing the warnings instead of an actual fix. In ndt.hpp, printing an error could make sense (something like |
I updated the PR info with better details with the full warning messages. The warnings are all related to how the variables may be uninitialized. I guess the compiler can't determine that Yes, |
mvieth
left a comment
There was a problem hiding this comment.
I updated the PR info with better details with the full warning messages.
Thanks!
I looked a bit more into the warnings and the code and it really seems like they are false positives because the compiler is not "smart enough" (at least the ones in io and recognition). g++14 does not show the warnings any more. With that in mind, the changes look good to me. Thanks!
This fixes a few uninitialized build warnings.
This was tested on Ubuntu 24.04, c++ version 13.3.0.
Some of the warnings that this attempts to fix: