Well, there is already such a patch that has been made for a long time by ALTLinux Distro. That distribution for some reason professes more pedantic warning options, and just like you, uses -W (or -Wextra) by default.
Most of the warnings that you reported are taking place due to the fact that the -Wsign-compare option is activated (which is part of the -Wextra set). For the moment, -Wsign-compare is not considered by leading distributions as a mandatory compilation option. For example, neither Fedora nor Debian use it. And I prefer not to use it too.
I am a bit old-school programmer, and the code itself was mainly created two decades ago. In those days, we simply wrote "int i;" and then "I < sizeof(someting)", not thinking that in theory there could be a comparison with different signedness. We were simply confident in our code, and we are sure that such a comparison will never lead to an erroneous result for our program.
Certainly, a number of organizations and areas of application can use “cheaper” programmers, which are weaker as professionals, and then to increase the reliability of the code they produce, such pedantic options ('-Wextra') are used. But it is not our case.
And sure, "int i;" looks more compact, clean and familiar for me than "unsigned int;" :) At least while the code is written by living people, not by AI. :)
The same is for "braces around empty body". Let it be as was written two decades ago.
Anyway, thanks for your report!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, there is already such a patch that has been made for a long time by ALTLinux Distro. That distribution for some reason professes more pedantic warning options, and just like you, uses -W (or -Wextra) by default.
Most of the warnings that you reported are taking place due to the fact that the -Wsign-compare option is activated (which is part of the -Wextra set). For the moment, -Wsign-compare is not considered by leading distributions as a mandatory compilation option. For example, neither Fedora nor Debian use it. And I prefer not to use it too.
I am a bit old-school programmer, and the code itself was mainly created two decades ago. In those days, we simply wrote "int i;" and then "I < sizeof(someting)", not thinking that in theory there could be a comparison with different signedness. We were simply confident in our code, and we are sure that such a comparison will never lead to an erroneous result for our program.
Certainly, a number of organizations and areas of application can use “cheaper” programmers, which are weaker as professionals, and then to increase the reliability of the code they produce, such pedantic options ('-Wextra') are used. But it is not our case.
And sure, "int i;" looks more compact, clean and familiar for me than "unsigned int;" :) At least while the code is written by living people, not by AI. :)
The same is for "braces around empty body". Let it be as was written two decades ago.
Anyway, thanks for your report!