[sldev] Notes from a Mac Build

Lillian Yiyuan lillie.yiyuan at gmail.com
Tue Nov 3 10:30:04 PST 2009


That produces the same error. I suppose the question is whether the
variables should be const char to begin with, but I don't know enough
about them to know whether they are modified, and thus don't want to
change the definition. The error also shows up in the mac-updater.





On Tue, Nov 3, 2009 at 10:04 AM, Argent Stonecutter
<secret.argent at gmail.com> wrote:
> Unless those values are actually going to be modified, that's an
> unnecessary function call. Also, if that code is executed repeatedly,
> it's a memory leak.
>
> Try making the conversion explicit with
>
>                         fakeconv.negative_sign = (char *)"-";
>                         fakeconv.mon_grouping = (char
> *)"\x03\x03\x00";       // commas every 3 digits
>
> On 2009-11-03, at 11:26, Lillian Yiyuan wrote:
>
>> Against the frozen viewer code, there was an error in llresmgr.cpp
>> with "deprecated conversion of string to char*" I changed two lines:
>>
>>
>> -                             fakeconv.negative_sign = "-";
>> -                             fakeconv.mon_grouping = "\x03\x03\x00"; // commas every 3 digits
>>
>> +                             fakeconv.negative_sign = strdup("-");
>> +                             fakeconv.mon_grouping = strdup("\x03\x03\x00"); // commas every
>> 3 digits
>> _______________________________________________
>> Policies and (un)subscribe information available here:
>> http://wiki.secondlife.com/wiki/SLDev
>> Please read the policies before posting to keep unmoderated posting
>> privileges
>
> "Welcome back, Anonymous, we're glad to see you again!"
>
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting privileges
>


More information about the SLDev mailing list