-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Enable more Warnings! #5487
Comments
I just tested with all the flags you specified and in the Kernel accessed code there are like 220 warning, most of them are old-style casts (129) and unsafe casts of integers of diffrerent sizes and signs(53)... |
Yes, compilers have many warnings. Do you have a specific plan to enable one of these warnings and deal with the fallout? |
I'll look into the oldstyle casts a bit and try to fix that 0 sized array in StringImpl |
The following warnings do not occur anywhere in the codebase and so enabling them is effectivly free: * `-Wcast-align` * `-Wduplicated-cond` * `-Wformat=2` * `-Wlogical-op` * `-Wmisleading-indentation` * `-Wunused` These are taken as a strict subset of the list in SerenityOS#5487.
I have started looking for the free warnings (ones which can be enabled without any new warnings occuring). A few things to report:
I will look into the warnings for virtuals ( |
The following warnings do not occur anywhere in the codebase and so enabling them is effectivly free: * `-Wcast-align` * `-Wduplicated-cond` * `-Wformat=2` * `-Wlogical-op` * `-Wmisleading-indentation` * `-Wunused` These are taken as a strict subset of the list in #5487.
I am now attempting to work on |
Status Report as of 15-Apr-2021Options so far implemented:
In the works:
Still to do:
|
|
The biggest issue for
This is too much for now and will probably need a redesign of the class. |
|
|
|
|
-Wall -Wextra
are the bare minumun of warnings to enable-Wmissing-declarations -Wformat=2
are a good step in the right direction, butgcc is known to have bad default warning options.
Here is an incomprehansive list of warnings to consider enabeling:
The text was updated successfully, but these errors were encountered: