[Flac-dev] const issue in FLAC__lpc_compute_residual_from_qlp_coefficients (libFLAC/lpc.c:233)

Denis Chatelain listes at octopodus.com
Tue Jan 13 07:40:01 PST 2004


I just tried to compile libFLAC (using Borland C++ Builder 6 on Windows).

The compilers yells at me on line 233 of libFLAC/lpc.c

*(residual++) = *(data++) - (sum >> lp_quantization);
--> data is const and cannot be modified

Funny thing is, if data is declared:
   const FLAC__int32 *data
instead of
   const FLAC__int32 data[]

everything is ok.

Is this a bug in my compiler, or a personnal lack of understanding of 
the difference in C between *data and data[] ?

Will changing const FLAC__int32 data[] to const FLAC__int32 *data will 
ruine everything ?


More information about the Flac-dev mailing list