-
Notifications
You must be signed in to change notification settings - Fork 554
[Runtime] Enable the -Wsign-conversion warnings flag and fix some of the warnings. #7405
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
[Runtime] Enable the -Wsign-conversion warnings flag and fix some of the warnings. #7405
Conversation
…he warnings. The flag adds a lot (A LOT) of warnings. The diff would be huge and dangerous to review. We enable the flag and fix file by file.
|
Build failure |
|
Build failure |
|
Build failure Test results6 tests failed, 82 tests passed.Failed tests
|
runtime/mono-runtime.h.t4
Outdated
|
|
||
| #ifndef GPOINTER_TO_INT | ||
| #define GPOINTER_TO_INT(p) ((int) (long) (p)) | ||
| #define GPOINTER_TO_INT(p) ((uint32_t) (long) (p)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the macro name incorrect, so:
| #define GPOINTER_TO_INT(p) ((uint32_t) (long) (p)) | |
| #define GPOINTER_TO_UINT(p) ((uint32_t) (long) (p)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sense, but the above #ifndef needs to be updated too
i.e. don't commit suggestion alone :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't it would not compile. It is a larger change (is used in several places) but can be done in this PR.
…acaque/xamarin-macios into partial-enable-Wsign-conversion
|
Build failure Test results20 tests failed, 68 tests passed.Failed tests
|
|
HE0038 (https://github.com/xamarin/maccore/issues/581) and issues with the msdn page that are fixed by #7401 |
Enable the flag that was disabled via pragmas. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas. Continuation of PR: #7405
Enable the flag that was disabled via pragmas. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: #7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
) Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: #7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: #7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: dotnet#7405
Enable the flag that was disabled via pragmas and fix warnings. Continuation of PR: #7405
Update flags: * Add -Werror so that warnings are errors. * Move to -Wconversion that adds: * -Wbitfield-enum-conversion * -Wbool-conversion * -Wconstant-conversion * -Wenum-conversion * -Wfloat-conversion * -Wimplicit-float-conversion * -Wimplicit-int-conversion * -Wint-conversion * -Wliteral-conversion * -Wnon-literal-null-conversion * -Wnull-conversion * -Wobjc-literal-conversion * -Wshorten-64-to-32 * -Wsign-conversion * -Wstring-conversion Last work related to: dotnet#7405
Update flags: * Add -Werror so that warnings are errors. * Move to -Wconversion that adds: * -Wbitfield-enum-conversion * -Wbool-conversion * -Wconstant-conversion * -Wenum-conversion * -Wfloat-conversion * -Wimplicit-float-conversion * -Wimplicit-int-conversion * -Wint-conversion * -Wliteral-conversion * -Wnon-literal-null-conversion * -Wnull-conversion * -Wobjc-literal-conversion * -Wshorten-64-to-32 * -Wsign-conversion * -Wstring-conversion Last work related to: #7405
The flag adds a lot (A LOT) of warnings. The diff would be huge and
dangerous to review. We enable the flag and fix file by file.