[Ffmpeg-devel] [PATCH] Reduce warnings by adding const specifier snow.c

Måns Rullgård mru
Thu Jan 25 01:53:14 CET 2007


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Wed, Jan 24, 2007 at 04:39:40PM +0100, Panagiotis Issaris wrote:
>> Hi,
>> 
>> The attached patch adds the const specifier as needed in the snow.c
>> file. This to reduce the number of warnings.
>> 
>> With friendly regards,
>> Takis
>> -- 
>> vCard: http://www.issaris.org/pi.vcf
>> Public key: http://www.issaris.org/pi.key
>
>> diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
>> index 78109f7..1574267 100644
>> --- a/libavcodec/dsputil.h
>> +++ b/libavcodec/dsputil.h
>> @@ -388,7 +388,7 @@ typedef struct DSPContext {
>>      /* snow wavelet */
>>      void (*vertical_compose97i)(DWTELEM *b0, DWTELEM *b1, DWTELEM *b2, DWTELEM *b3, DWTELEM *b4, DWTELEM *b5, int width);
>>      void (*horizontal_compose97i)(DWTELEM *b, int width);
>> -    void (*inner_add_yblock)(uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
>> +    void (*inner_add_yblock)(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
>
> how does changing int obmc_stride to const supress a warning?

That one was already const.  The patch changes the uint8_t *obmc to
const, which might well make a difference.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list