[flac-dev] FIxed rest of cast-align warnings

Erik de Castro Lopo mle+la at mega-nerd.com
Mon Jun 30 00:49:08 PDT 2014


lvqcl wrote:

> Erik de Castro Lopo wrote:
> 
> >> FLAC__int16 s16buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)/sizeof(FLAC__int16)];
> >>
> >> instead of
> >>
> >> FLAC__int16 s16buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int16)];
> >
> > Really? Would you also write this? :
> >
> > FLAC__int32 s32buffer[FLAC__MAX_BLOCK_SIZE * FLAC__MAX_CHANNELS * sizeof(FLAC__int32)/sizeof(FLAC__int32)];
> 
> Well, in the latter case it's obviously redundant; in the former case it's
> not so obvious (at least, not for me).

Maybe a comment stating that all these array are exactly the same in
bytes, but the number of elements is different because of the different
size of each element? Would that help?

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list