Commit 702b903
authored
[runtime] Adopt safer native compiler flags: Wcast-function-type-mismatch (#24083)
Example warning:
```
macios/runtime/trampolines.m:1784:9: error: cast from 'void *(*)(MonoObject *, void *, GCHandle *)' (aka 'void *(*)(_MonoObject *, void *, void **)') to 'xamarin_managed_to_id_func' (aka 'id (*)(_MonoObject *, void *, void **)') converts to incompatible function type [-Werror,-Wcast-function-type-mismatch]
1784 | return (xamarin_managed_to_id_func) xamarin_smart_enum_to_nsstring;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
References:
* https://developer.apple.com/documentation/xcode/enabling-enhanced-security-for-your-app
* https://releases.llvm.org/8.0.0/tools/clang/docs/ReleaseNotes.html#major-new-features (for -ftrivial-auto-var-init=zero)
Contributes towards #23023.1 parent 154bd46 commit 702b903
3 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
717 | | - | |
| 717 | + | |
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
| |||
1674 | 1674 | | |
1675 | 1675 | | |
1676 | 1676 | | |
1677 | | - | |
| 1677 | + | |
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments