xforms-development
[Top][All Lists]
Advanced

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

[XForms] Annoying warning message


From: Luis Ernesto Carrera Retana
Subject: [XForms] Annoying warning message
Date: Thu, 27 Sep 2012 20:29:24 -0600

Hi:

I'm programming in a mac, with:

$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)

The options in the compiling are:
gcc -Wall -Wextra -std=c99 -pedantic -lforms -I/opt/local/include -L/opt/local/lib -c foo.c

and shows the following warning:
In file included from /opt/local/include/X11/Xlib.h:47,
                 from /opt/local/include/forms.h:99,
                 from foo.c:2:
/opt/local/include/X11/Xfuncproto.h:136:24: warning: ISO C does not permit named variadic macros

When I read the file Xfuncproto.h:

Xfuncproto.h :: 132
/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable
   argument macros, must be only used inside #ifdef _X_NONNULL guards, as
   many legacy X clients are compiled in C89 mode still. */
#if defined(__GNUC__) &&  ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
#define _X_NONNULL(args...)  __attribute__((nonnull(args)))                                            <---------- line 136
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
#define _X_NONNULL(...)  /* */
#endif

So it seems to me that although i'm using c99, it reads as true line 135. Maybe is a mac problem. Anyway, I solved defining in the opposite way:

#if defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */
#define _X_NONNULL(...)  /* */
#elif defined(__GNUC__) &&  ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
#define _X_NONNULL(args...)  __attribute__((nonnull(args)))
#endif

Thanks for your time and effort.

Yours:
Luis Ernesto Carrera Retana.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]