-
-
Notifications
You must be signed in to change notification settings - Fork 556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional C flags to your build (improving your code) #435
Comments
Most of these warnings seem to come from |
There are indeed a lot of warnings coming from sign-conversion. But also dozens of warnings from the other flags. Maybe you want to explain why you do not recommend that specific flag? Edit: the output I show is just a very small output of the whole warning list. So try to build it yourself, to see the WHOLE build log. |
You'd really have to carefully audit each and every case
I only get about three or four, depending on the compiler.
Regarding the other options you propose:
We use these already.
Should be a no-op on x86. You really want
Could be added as a precaution.
This warning is enabled by default. Why should it be made into an error? In my opinion, In general, |
Wauw, this is really helpful thanks for your insides and explanation! I saw you already made some changes https://github.com/commonmark/cmark/pull/436/files |
I got conflicting answers on that discussion: "You should really compile with -Werror which will prevent your compiler from generating code that segfaults" |
Try to build with the following C flags and improve your code:
You will get some nice warnings, function declarations isnt' a prototype, unused-parameters and quite a lot of sign-conversion warnings.
Maybe it's worth looking into those warnings! Those are there for a reason... Those warnings can now be spotted and fixed, improving your code quality.
Small snippet from the output (NOT the full output):
The text was updated successfully, but these errors were encountered: