From 60688c3fe71f322fbf30938da47e717f9c3a0fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Wed, 3 Oct 2018 14:23:01 +0200 Subject: [PATCH] Fix GDNative build warning on Android [-Wignored-attributes] Fixes the following kind of warning spam: ``` modules/gdnative/include/gdnative/color.h:61:6: warning: calling convention 'sysv_abi' ignored for this target [-Wignored-attributes] void GDAPI godot_color_new_rgba(godot_color *r_dest, const godot_real p_r, const godot_real p_g, const godot_real p_b, const godot_real p_a); ^ modules/gdnative/include/gdnative/gdnative.h:52:15: note: expanded from macro 'GDAPI' ^ modules/gdnative/include/gdnative/gdnative.h:51:38: note: expanded from macro 'GDCALLINGCONV' ^ ``` --- modules/gdnative/include/gdnative/gdnative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 616c305f255..796ced84f47 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -35,7 +35,7 @@ extern "C" { #endif -#ifdef _WIN32 +#if defined(_WIN32) || defined(__ANDROID__) #define GDCALLINGCONV #define GDAPI GDCALLINGCONV #elif defined(__APPLE__) @@ -47,7 +47,7 @@ extern "C" { #define GDCALLINGCONV __attribute__((sysv_abi)) #define GDAPI GDCALLINGCONV #endif -#else +#else // !_WIN32 && !__APPLE__ #define GDCALLINGCONV __attribute__((sysv_abi)) #define GDAPI GDCALLINGCONV #endif