[glib: 1/2] tests: Fix a pragma warning on FreeBSD



commit f9a24ced63a8d93829becba4189154643cbf9b50
Author: Philip Withnall <withnall endlessm com>
Date:   Sat Aug 24 15:49:48 2019 +0300

    tests: Fix a pragma warning on FreeBSD
    
    This fixes the following warning, by making the compiler checks for the
    `pop` match those for the `push`:
    ```
    [221/1124] Compiling C object 'glib/tests/d796b50@@mem-overflow@exe/mem-overflow.c.o'.
    ../glib/tests/mem-overflow.c:204:24: warning: pragma diagnostic pop could not pop, no matching push 
[-Wunknown-pragmas]
     #pragma GCC diagnostic pop
    ```
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 glib/tests/mem-overflow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/glib/tests/mem-overflow.c b/glib/tests/mem-overflow.c
index 64ec0b0cd..61225b763 100644
--- a/glib/tests/mem-overflow.c
+++ b/glib/tests/mem-overflow.c
@@ -200,7 +200,7 @@ empty_alloc (void)
 }
 #endif
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && __GNUC__ > 6
 #pragma GCC diagnostic pop
 #endif
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]