[mtouch/mmp] Avoid a few clang warnings in the generated pinvoke code. (#5541)
This commit is contained in:
Родитель
db01babe71
Коммит
736cb90ac6
|
@ -52,6 +52,13 @@ namespace Xamarin.Bundler
|
||||||
mthds.WriteLine ($"#include \"{Path.GetFileName (HeaderPath)}\"");
|
mthds.WriteLine ($"#include \"{Path.GetFileName (HeaderPath)}\"");
|
||||||
|
|
||||||
sb.WriteLine ("extern \"C\" {");
|
sb.WriteLine ("extern \"C\" {");
|
||||||
|
|
||||||
|
// Disable "control reaches end of non-void function"
|
||||||
|
// we throw exceptions in many code paths, which clang doesn't know about, triggering this warning.
|
||||||
|
sb.WriteLine ("#pragma clang diagnostic ignored \"-Wreturn-type\"");
|
||||||
|
|
||||||
|
// Disable "warning: 'X' is only available on xOS Y.Z or newer"
|
||||||
|
sb.WriteLine ("#pragma clang diagnostic ignored \"-Wunguarded-availability-new\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void End ()
|
public void End ()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче