Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Mar 2008 02:00:06 GMT
From:      Dan Lukes <dan@obluda.cz>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/71613: [PATCH] traceroute(8): cleanup of the usr.sbin/traceroute6 code
Message-ID:  <200803150200.m2F206rl078586@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/71613; it has been noted by GNATS.

From: Dan Lukes <dan@obluda.cz>
To: bruce@cran.org.uk
Cc: bug-followup@freebsd.org
Subject: Re: bin/71613: [PATCH] traceroute(8): cleanup of the usr.sbin/traceroute6
 code
Date: Sat, 15 Mar 2008 02:50:12 +0100

 bruce@cran.org.uk napsal/wrote, On 03/15/08 02:15:
 > I'm not sure 'volatile' is correct in this case - string literals should
 > be defined 'const' since they can't be changed. 
 
 	Content of array of chars can be changed unless defined 'const'. You 
 can't exceed the size of originally allocated space for such array, of 
 course. To const or not to const, it is our decision.
 
 	To be understand correctly - I'm not against 'const', I'm against 
 "*since they can't be changed*". This particular string literal should 
 be defined 'const' *because* it's not changed.
 
 	But back to the topic:
 
 > Doing this removes the warning about 'copyright' being unused.
 
 	I don't understand what the 'const' has to do with "variable has been 
 used" so I can't explain why it remove the warning. I'm not sure it's 
 not an unintentional interference that occur only in (that version of) gcc.
 
 	But I may not have sufficient knowledge of C details. If we are sure 
 the 'const' shall have required effect to "unused" warning by definition 
 then I have nothing against 'const' way patch.
 
 						Dan
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803150200.m2F206rl078586>