[FFmpeg-devel] [PATCH] Fix some constness related warnings in opt.c

Stefano Sabatini stefano.sabatini-lala
Wed Aug 20 11:00:08 CEST 2008

signature for for ff_eval2() is:
double ff_eval2(const char *s, double *const_value, const char **const_name,
               double (**func1)(void *, double), const char **func1_name,
               double (**func2)(void *, double, double), char **func2_name,
               void *opaque, const char **error){

while we're passing in opt.c as the second and third argument:
double *const_value against 
const double *const_value,

const char const **const_name against
const char **const_name,

which results in the gcc warnings:
opt.c: In function ?av_set_string2?:
opt.c:164: warning: passing argument 2 of ?ff_eval2? discards qualifiers from pointer target type
opt.c:164: warning: passing argument 3 of ?ff_eval2? discards qualifiers from pointer target type

Patch addresses this.

FFmpeg = Freak and Furious MultiPurpose Elastic Glue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-opt-c-const-warns-00.patch
Type: text/x-diff
Size: 450 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080820/bbf4d176/attachment.patch>

More information about the ffmpeg-devel mailing list