Wireshark mailing list archives

Re: Bug 8416 - remove C++ incompatibilities from packet-pw-atm.c


From: Evan Huus <eapache () gmail com>
Date: Fri, 1 Mar 2013 08:14:12 -0500

On Fri, Mar 1, 2013 at 1:14 AM, Anders Broman <a.broman () bredband net> wrote:
Evan Huus skrev 2013-03-01 03:50:

On Thu, Feb 28, 2013 at 9:39 PM, Ed Beroset <beroset () mindspring com>
wrote:

Jaap Keuter <jaap.keuter () xs4all nl>

What I would like to see is the abolishment of the
pwc_packet_properties_t type
altogether. This is _not_ an enum.

I agree, and have come across another such "enum abuse" instance that may
be harder to address. Specifically, in the header file gmessages.h there is
a similar typedef enum called GLogLevelFlags which is also intended to
provide names for bitflags rather than actually enumerate.  This construct
is used a number of places in the Wireshark code (such as line 3169 of
plugins/asn1/packet-asn1.c).  Adding a cast quiets the compiler, but is
there a better way that doesn't require rewriting glib-2.0?

         mylogh = g_log_set_handler (NULL,
GLogLevelFlags(G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL
                                                     |
G_LOG_FLAG_RECURSION), my_log_handler, NULL);

Ed

Not off the top of my head. Fortunately, the vast majority of
G_LOG_LEVEL_* uses are in g_log calls that shouldn't cause problems -
there are only five or six cases I noticed where we were doing
bit-fieldy things with them.

On a side note, does any one know how to regenerate the PIDL dissectors?
there is a
potential fix in the template waiting for regeneration.

I think there is an epan/dissectors/pidl/README, though I have never
verified the instruction in it.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: