Ethereal-dev: [Ethereal-dev] Understanding DISSECTOR_ASSERT

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Joerg Mayer <jmayer@xxxxxxxxx>
Date: Fri, 8 Jul 2005 16:17:26 +0200
I'm getting the following warning whenever the DISSECTOR_ASSERT macro is
used:
warning: ISO C forbids conditional expr with only one void side

This seems to be caused by the following construct:

  ((void) ((expression) ? 0 :  (...)))

When I call __DISSECTOR_ASSERT directly, I do not get the warning.

What is the reason this is used?
gcc is gcc-4.0 (GCC) 4.0.1 20050603 (prerelease) (SUSE Linux)

Thanks
      Joerg
-- 
Joerg Mayer                                           <jmayer@xxxxxxxxx>
We are stuck with technology when what we really want is just stuff that
works. Some say that should read Microsoft instead of technology.