Skip to content
  • Fabrice Fontaine's avatar
    gobject: fix compilation with gcc <= 4.7 · 8de72c56
    Fabrice Fontaine authored and Philip Withnall's avatar Philip Withnall committed
    On gcc 4.7, we got the following error:
    
    i686-nptl-linux-gnu-gcc --version
    > i686-nptl-linux-gnu-gcc (crosstool-NG 1.20.0) 4.7.4
    > $ echo '#include <glib-object.h>' | i686-nptl-linux-gnu-gcc -x c -I
    staging/usr/include/glib-2.0 -I staging/usr/lib/glib-2.0/include -Wall
    -Werror -c - -o /tmp/foo.o
    > In file included from
    staging/usr/include/glib-2.0/gobject/gbinding.h:29:0,
    >                  from staging/usr/include/glib-2.0/glib-object.h:23,
    >                  from <stdin>:1:
    > staging/usr/include/glib-2.0/gobject/gobject.h: In function
    'g_set_object':
    > staging/usr/include/glib-2.0/gobject/gobject.h:725:5: error: value
    computed is not used [-Werror=unused-value]
    > cc1: all warnings being treated as errors
    
    This error has been added by commit 3fae39a5
    So enable the new g_set_object definition only if gcc >= 4.8
    
    Fixes:
     - http://autobuild.buildroot.net/results/b29a2f868438a2210873ea72f491db63175848be
    
    Signed-off-by: Fabrice Fontaine ...
    8de72c56