[Linux-ha-dev] cast lvalues is deprecated

Andrew lists at beekhof.homeip.net
Wed Jun 2 03:48:06 MDT 2004


On Jun 2, 2004, at 11:45 AM, Lars Ellenberg wrote:

> / 2004-06-02 17:28:40 +0800
> \ Zhu, Yi:
>>
>> Hi,
>>
>> I know here is not comp.lang.c, but may I have a question?
>>
>> I use gcc 3.3.3 within Fedora Core 2. I can't compile below
>> code without warning any more. Any chance to fix it without strcpy?
>>
>> main()
>> {
>>         char * a; /* a must be char * */
>>
> -         (const char *)a = "something";
> +         a = (char *) "something";

from memory you'll still get a warning, which will of course be fatal 
in a HA build :)

>> }
>
> maybe that is more like what you mean...
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/



More information about the Linux-HA-Dev mailing list