GNOME Bugzilla – Bug 240252
LOG(e...) syntax error
Last modified: 2013-09-10 14:03:10 UTC
When building Evolution on Solaris 8 with Forte, I met error as follows: "address-conduit.c", line 60: syntax error in macro parameters "address-conduit.c", line 65: syntax error in macro parameters "address-conduit.c", line 66: syntax error in macro parameters "address-conduit.c", line 615: warning: label should be followed by a (possibly empty) statement "address-conduit.c", line 630: warning: label should be followed by a (possibly empty) statement "address-conduit.c", line 645: warning: label should be followed by a (possibly empty) statement "address-conduit.c", line 662: warning: label should be followed by a (possibly empty) statement "address-conduit.c", line 879: warning: assignment type mismatch: pointer to unsigned char "=" pointer to char "address-conduit.c", line 923: warning: argument #2 is incompatible with prototype: prototype: pointer to unsigned char : "/usr/local/include//pi-address.h", line 50 argument : pointer to char cc: acomp failed for address-conduit.c make[3]: *** [address-conduit.lo] Error 1 make[3]: Leaving directory `/export/home/work/evo_src_Mar25/addressbook/conduit' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/export/home/work/evo_src_Mar25/addressbook' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/export/home/work/evo_src_Mar25' make: *** [all-recursive-am] Error 2 bash-2.03$ The content of file address-conduit.c is as follows: 59 #ifdef DEBUG_CONDUIT 60 #define LOG(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e) 61 #else 62 #define LOG(e...) 63 #endif 64 65 #define WARN(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, e) 66 #define INFO(e...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e) Forte compiler cannot explain the syntax as LOG(e...).
Change into: 59 #ifdef DEBUG_CONDUIT 60 #define LOG(e,...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e) 61 #else 62 #define LOG(e,...) 63 #endif 64 65 #define WARN(e,...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, e) 66 #define INFO(e,...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, e) Compiling passed.
Created attachment 42166 [details] [review] Patch for this bug
Other two files also have this issue: evolution/calendar/conduits/calendar/calendtodo-conduit.c evolution/calendar/conduits/todo/ar-conduit.c
Created attachment 42167 [details] [review] Patch for total 3 files
this patch is incorrect. it breaks the behaviour, and it also relies on c99 standard syntax, which we are not supporting
Created attachment 42210 [details] [review] different fix
JP committed the fix.
This question still exists in 4.7's trunk. Notzed and Ettore, have your patch been checked in? Thanks.
Patch commited on April 7 th. according to evolution-patches list.