[sldev] -Werror (was: Notes from a Mac Build)
Argent Stonecutter
secret.argent at gmail.com
Fri Nov 6 04:37:46 PST 2009
On 2009-11-06, at 02:00, lists.secondlife.com at trap.wereanimal.net wrote:
> On Wednesday 04 November 2009 10:05:45 am Lillian Yiyuan wrote:
>> -Werror is supplied by the make files. This too involves changing
>> code, and is a bad idea in open source, since it gets people to check
>> problems before submitting them as patches.
>>
>> Better here, I think, would be to make this opaque, rather than
>> having
>> constant strings in cpp files that the code hands out char * to.
>>
>> The compiler is right here, this is a bad idea, and it should be
>> fixed
>> rather than swept under the rug.
>>
>
> From the Coding Standard wiki at
> http://wiki.secondlife.com/wiki/Coding_standardhttp://wiki.secondlife.com/wiki/Coding_standard
>
> "Fix all compiler warnings. "
"Fix all compiler warnings" doesn't mean "sweep under the rug".
Shoving in a strdup() is sweeping it under the rug.
Incidentally... if there is an actual vulnerability caused by string
punning, throwing in a strdup() won't necessarily fix it. Particularly
in the case of the first string which is almost certainly unique. The
right fix is almost certainly making the structure members pointers to
const strings.
More information about the SLDev
mailing list