[src] Ensure complete (error) coverage for nullability warnings (#12401)
Use the _recent_ [1] `nullable` to ensure we treat all nullable warnings as errors. That list can (and has) change[d] over time... Fix one case, `CVTime`, that was (only) a warning in our build. Also fix `Makefile` so we are not giving the `warnaserror` for nullable to the generator. It does not use them (different codes) and does not accept string values (which breaks the build). IOW it's the generated code that must be nullable-aware, not the input to the generator. [1] https://github.com/dotnet/roslyn/issues/41605
This commit is contained in:
Родитель
a20d417bf7
Коммит
32e1381ee1
|
@ -58,7 +58,7 @@ namespace CoreVideo {
|
|||
}
|
||||
#endif
|
||||
|
||||
public override bool Equals (object other)
|
||||
public override bool Equals (object? other)
|
||||
{
|
||||
if (!(other is CVTime))
|
||||
return false;
|
||||
|
|
|
@ -73,9 +73,9 @@ include $(TOP)/opentk/Makefile.include
|
|||
# It takes a comma separated list, but an empty list means
|
||||
# reporting all warnings as errors.
|
||||
#
|
||||
# https://cezarypiatek.github.io/post/non-nullable-references-in-dotnet-core/
|
||||
NULLABILITY_WARNINGS=8073,8597,8600,8601,8602,8603,8604,8605,8606,8607,8608,8609,8610,8610,87611,8612,8613,8614,8615,8616,8617,8618,8619,8620,8621,8622,8624,8625,8626,8629,8631,8632,8633,8634,8638,8343,8644,8645,8653,8654,8655,8667,8714,8767
|
||||
GENERATOR_WARNASERROR=$(NULLABILITY_WARNINGS)
|
||||
# https://github.com/dotnet/roslyn/issues/41605
|
||||
NULLABILITY_WARNINGS=nullable
|
||||
GENERATOR_WARNASERROR=
|
||||
IOS_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
WATCH_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
TVOS_GENERATOR_WARNASERROR=$(GENERATOR_WARNASERROR)
|
||||
|
|
Загрузка…
Ссылка в новой задаче