After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 333115 - pangowin32-private.h: ternary operator without return-value
pangowin32-private.h: ternary operator without return-value
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: win32
1.11.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2006-03-02 11:29 UTC by Kazuki Iwamoto
Modified: 2006-03-03 01:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kazuki Iwamoto 2006-03-02 11:29:10 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:
Comment 1 Behdad Esfahbod 2006-03-02 23:28:45 UTC
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?
Comment 2 Tor Lillqvist 2006-03-02 23:56:28 UTC
The "Expected results" is what it should be changed to ;) Fixed in CVS.
Comment 3 Behdad Esfahbod 2006-03-03 01:01:01 UTC
Oh my...