Re: Removing "if (a = b)" warning
In article <43617937.7CED@ mindspring.com> , pete <pfiland@mindsp ring.com>
writes[color=blue]
>Martin Ambuhl wrote:[color=green]
>>
>> Stephen wrote:[color=darkred]
>> > Is there a standard way to remove
>> > the warning that a C compiler might
>> > produce from the statement:
>> >
>> > if (a = b) {}
>> >
>> > I don't want to do:
>> >
>> > if ((a = b) != 0) {}[/color][/color][/color]
[color=blue]
> if (A)
>means exactly the same thing as
> if ((A) != 0)
>
>for any and all possible meanings of A, including funky macros.[/color]
You've missed the point:
if ((a = b) != 0)
will kill the warning generated by:
if (a = b)
In article <43617937.7CED@ mindspring.com> , pete <pfiland@mindsp ring.com>
writes[color=blue]
>Martin Ambuhl wrote:[color=green]
>>
>> Stephen wrote:[color=darkred]
>> > Is there a standard way to remove
>> > the warning that a C compiler might
>> > produce from the statement:
>> >
>> > if (a = b) {}
>> >
>> > I don't want to do:
>> >
>> > if ((a = b) != 0) {}[/color][/color][/color]
[color=blue]
> if (A)
>means exactly the same thing as
> if ((A) != 0)
>
>for any and all possible meanings of A, including funky macros.[/color]
You've missed the point:
if ((a = b) != 0)
will kill the warning generated by:
if (a = b)
Comment