GNOME Bugzilla – Bug 333115
pangowin32-private.h: ternary operator without return-value
Last modified: 2006-03-03 01:01:01 UTC
Please describe the problem: PING uses ternary operator. But 'g_print' has no return-value. Both operands should have return-value of the same type. Steps to reproduce: 1. compile pangowin32.c Actual results: following messages are displayed. (Visual C++ 6.0) pangowin32.c(267) : error C4053: one void operand for '?:' pangowin32.c(1512) : error C4053: one void operand for '?:' pangowin32.c(1530) : error C4053: one void operand for '?:' pangowin32.c(1554) : error C4053: one void operand for '?:' pangowin32.c(1560) : error C4053: one void operand for '?:' pangowin32.c(1568) : error C4053: one void operand for '?:' pangowin32.c(1572) : error C4053: one void operand for '?:' Expected results: For example, #ifdef PANGO_WIN32_DEBUGGING #ifdef __GNUC__ #define PING(printlist) \ (pango_win32_debug ? \ (g_print ("%s:%d ", __PRETTY_FUNCTION__, __LINE__), \ g_print printlist, \ g_print ("\n")), 0 : \ 0) #else #define PING(printlist) \ (pango_win32_debug ? \ (g_print ("%s:%d ", __FILE__, __LINE__), \ g_print printlist, \ g_print ("\n")), 0 : \ 0) #endif #else /* !PANGO_WIN32_DEBUGGING */ #define PING(printlist) #endif Does this happen every time? every time Other information:
I don't quite see it, as there is a ", 0" after the print statements. Probably a compiler bug, but maybe moving ",0" inside the brackets helps. Tor?
The "Expected results" is what it should be changed to ;) Fixed in CVS.
Oh my...