Wireshark mailing list archives
Re: [Wireshark-commits] rev 25601: /trunk/ /trunk/epan/dissectors/: packet-cdp.c packet-dhcp-failover.c packet-fix.c packet-icep.c packet-icmpv6.c packet-ieee80211.c packet-image-png.c packet-imf.c packet-ip.c ...
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Wed, 12 Jan 2011 16:51:03 -0500
guy () wireshark org wrote:
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=25601 User: guy Date: 2008/06/25 02:12 AM Log:Constify a bunch of stuff, to squelch -Wwrite-strings warnings. epan/dissectors/packet-ncp2222.inc is a bit hard to fix, so we're notready to enable that warning by default yet.Throw in some casts to handle GLib routines that take arbitrarynon-const pointers (they can later return the pointers, and some callers might want to modify or free up those pointers in cases where they're known to be writable or allocated).
This modified ip_to_str() so that the char* it returns is const. That's apparently fine (obviously nobody actually modifies the returned string), but in reality the string is ep_alloc()'d so they COULD modify it without breaking anything, right? (Whether that would be good form is another question...)
I guess I'm not sure what that changed fixed. And/or should ip6_to_str() also be modified to return a const string?
___________________________________________________________________________ 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:
- Re: [Wireshark-commits] rev 25601: /trunk/ /trunk/epan/dissectors/: packet-cdp.c packet-dhcp-failover.c packet-fix.c packet-icep.c packet-icmpv6.c packet-ieee80211.c packet-image-png.c packet-imf.c packet-ip.c ... Jeff Morriss (Jan 12)