[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
|
|
|
||
| #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.
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.
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.
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.