gcc compiler warnings
Andrew Haley
aph@redhat.com
Wed May 19 10:27:00 GMT 2010
On 05/19/2010 10:42 AM, lee wrote:
> Hi simple qeuery ...
>
> why does gcc give a warning: warning: value computed is not used
>
> for... ptr++;
>
> when the value is actually used!
>
> code segment...
> do {
> oldval=*ptr;//make local copy
> *ptr++; // scroll 1 ahead in ring buffer
Do you mean
ptr++;
?
Andrew.
> if(isHeader(&oldval) && cntnumber > 1 ) //skip first header word.
> check for header words inside data
> break;
> cntnumber += 1;
> }while( !isTrailer( &oldval ) && cntnumber < totalchannels ); //
> copy until the trailer
>
> Regards
> L
>
More information about the Gcc-help
mailing list