From patchwork Sat Feb 20 07:22:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Guo, Yejun" X-Patchwork-Id: 25836 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 40ACD4498CA for ; Sat, 20 Feb 2021 09:33:01 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2586968A898; Sat, 20 Feb 2021 09:33:01 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 67DCB68A8B9 for ; Sat, 20 Feb 2021 09:32:54 +0200 (EET) IronPort-SDR: xOtuTt7KQ8Eed52D2qAothfm4pd9IWUKbuIY3pwA4XcFqj1KhOgKAsmdnm+bGm+sErZcx3ijuE yJ+otzFe+1/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9900"; a="181506647" X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="181506647" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2021 23:32:47 -0800 IronPort-SDR: XnikdVLpDkLbdLhe7+54SdEZ02b6w1D1W4vdm1LyRlD5raYS1pw7ZbBYd/GzvmBi936QHVj9Cw h4uDlbeR8ZRQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,192,1610438400"; d="scan'208";a="440578098" Received: from yguo18-skl-u1604.sh.intel.com ([10.239.159.53]) by orsmga001.jf.intel.com with ESMTP; 19 Feb 2021 23:32:46 -0800 From: "Guo, Yejun" To: ffmpeg-devel@ffmpeg.org Date: Sat, 20 Feb 2021 15:22:18 +0800 Message-Id: <20210220072218.31629-8-yejun.guo@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210220072218.31629-1-yejun.guo@intel.com> References: <20210220072218.31629-1-yejun.guo@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 8/8] libavutil/opt.c: fix build warning X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: yejun.guo@intel.com Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" src/libavutil/opt.c: In function ‘av_opt_child_class_iterate’: src/libavutil/opt.c:1738:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] *iter = parent->child_class_next(*iter); ^ --- This patch set fixes build warnings during make on my system with gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) with config option: --disable-optimizations --enable-libx264 --enable-libx265 --enable-gpl --enable-libvpx --enable-libmfx --extra-cflags="-Wno-deprecated-declarations" I also tried '-Wall -Werror', there are many many issues starting from configure. It is a long term task, let's fix one by one when have time. libavutil/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 590146b5fb..c47146c47f 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1735,7 +1735,7 @@ const AVClass *av_opt_child_class_iterate(const AVClass *parent, void **iter) #if FF_API_CHILD_CLASS_NEXT FF_DISABLE_DEPRECATION_WARNINGS if (parent->child_class_next) { - *iter = parent->child_class_next(*iter); + *iter = (void *)parent->child_class_next(*iter); return *iter; } FF_ENABLE_DEPRECATION_WARNINGS