From e08490eccdc4e0efe7a6b07ad419529d9bf94197 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Fri, 22 Sep 2017 11:58:37 +0200 Subject: [PATCH] [runtime] Ask clang to be quiet about using new API for our conversion methods. --- runtime/trampolines.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/trampolines.m b/runtime/trampolines.m index 3bfdfe068f..d0ca72ae7b 100644 --- a/runtime/trampolines.m +++ b/runtime/trampolines.m @@ -761,6 +761,9 @@ exception_handling: return convertedValue; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunguarded-availability-new" + // Returns a pointer to the value type, which must be freed using xamarin_free. // If called multiple times in succession, the returned pointer can be passed as the second ptr argument, and it need only be freed once done iterating. void *xamarin_nsnumber_to_bool (NSNumber *number, void *ptr, MonoClass *managedType, guint32 *exception_gchandle) { BOOL *valueptr = (BOOL *) (ptr ? ptr : xamarin_calloc (sizeof (BOOL))); *valueptr = [number boolValue]; return valueptr; } @@ -905,6 +908,8 @@ id xamarin_uiedgeinsets_to_nsvalue (MonoObject *value, guint32 *except id xamarin_uioffset_to_nsvalue (MonoObject *value, guint32 *exception_gchandle) { return [NSValue valueWithUIOffset: *(UIOffset *) mono_object_unbox (value)]; } #endif +#pragma clang diagnostic pop + static void * xamarin_get_nsnumber_converter (MonoClass *managedType, MonoMethod *method, bool to_managed, guint32 *exception_gchandle) {