ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 25601: /trunk/ /trunk/epan/dissector

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Wed, 12 Jan 2011 16:51:03 -0500
guy@xxxxxxxxxxxxx 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 not
 ready to enable that warning by default yet.
Throw in some casts to handle GLib routines that take arbitrary
 non-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?