[mtouch/mmp] Avoid a few clang warnings in the generated pinvoke code. (#5541)

This commit is contained in:
Rolf Bjarne Kvinge 2019-02-04 15:20:44 +01:00 коммит произвёл GitHub
Родитель db01babe71
Коммит 736cb90ac6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -52,6 +52,13 @@ namespace Xamarin.Bundler
mthds.WriteLine ($"#include \"{Path.GetFileName (HeaderPath)}\"");
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 ()