Re: may be undefined operation warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  >  >  c =  out_pix + (voffset - *cp++)*out_rowstride;
>  >  >  *c++ = MAX_CHAR(*c, accum);  ///<------------- warning on this line
>  >
>  >  The first store to *c happens after the load on the RHS of the assignment.
>  >
>
>  Thanks,
>  Perhaps I should have mentioned that before this is called (which is
>  in a tight for loop), I zero out the entire block of memory.  Is what
>  you mentioned causing the error or were you just pointing out a
>  potential coding error?


Argghh.  I just noticed I didn't post the macro like I thought I had:

#define MAX_CHAR(data, accum)	((255 - (data)) > (accum)) ? ((accum) +
(data)) : 255

wes

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux