From 3c56a421d8ea980a900892aa4da4a104c6943c03 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Sat, 6 Aug 2011 12:42:02 +0200 Subject: [PATCH] lavfi: avoid void* arithmetic in defaults.c:set_common_formats() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit void* pointer arithmetic semantics is undefined, use uint8_t* instead. Also fix GCC warnings: defaults.c: In function ‘set_common_formats’: defaults.c:184: warning: pointer of type ‘void *’ used in arithmetic defaults.c:189: warning: pointer of type ‘void *’ used in arithmetic --- libavfilter/defaults.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/defaults.c b/libavfilter/defaults.c index aadecf2d02..503036dafc 100644 --- a/libavfilter/defaults.c +++ b/libavfilter/defaults.c @@ -181,12 +181,12 @@ static void set_common_formats(AVFilterContext *ctx, AVFilterFormats *fmts, for (i = 0; i < ctx->input_count; i++) if (ctx->inputs[i] && ctx->inputs[i]->type == type) avfilter_formats_ref(fmts, - (AVFilterFormats**)((void*)ctx->inputs[i]+offout)); + (AVFilterFormats **)((uint8_t *)ctx->inputs[i]+offout)); for (i = 0; i < ctx->output_count; i++) if (ctx->outputs[i] && ctx->outputs[i]->type == type) avfilter_formats_ref(fmts, - (AVFilterFormats**)((void*)ctx->outputs[i]+offin)); + (AVFilterFormats **)((uint8_t *)ctx->outputs[i]+offin)); if (!fmts->refcount) { av_free(fmts->formats);