From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 1078043784 for ; Tue, 28 Jun 2022 08:52:49 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AAE268B930; Tue, 28 Jun 2022 11:52:46 +0300 (EEST) Received: from mail8.parnet.fi (mail8.parnet.fi [77.234.108.134]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F0D968B8A8 for ; Tue, 28 Jun 2022 11:52:39 +0300 (EEST) Received: from mail9.parnet.fi (mail9.parnet.fi [77.234.108.21]) by mail8.parnet.fi with ESMTP id 25S8qbwi016580-25S8qbwj016580; Tue, 28 Jun 2022 11:52:37 +0300 Received: from foo.martin.st (host-97-187.parnet.fi [77.234.97.187]) by mail9.parnet.fi (Postfix) with ESMTPS id BF70EA142E; Tue, 28 Jun 2022 11:52:37 +0300 (EEST) Date: Tue, 28 Jun 2022 11:52:37 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-FE-Policy-ID: 3:14:2:SYSTEM Subject: Re: [FFmpeg-devel] [PATCH] avutil/wchar_filename: Make the header C++ compatible X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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: Andreas Rheinhardt Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 28 Jun 2022, Andreas Rheinhardt wrote: > When compiling decklink, this header is included from > a C++ file (albeit inside 'extern "C"') and this > causes compilation failures because of an implicit > void* -> char* conversion. So add an explicit cast. > Should fix ticket #9819. > > Signed-off-by: Andreas Rheinhardt > --- > If we didn't include os_support.h in lots of places via lavf/internal.h, > this issue wouldn't exist. > > libavutil/wchar_filename.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavutil/wchar_filename.h b/libavutil/wchar_filename.h > index 08de073ed7..9a04a069f1 100644 > --- a/libavutil/wchar_filename.h > +++ b/libavutil/wchar_filename.h > @@ -54,7 +54,7 @@ static inline int wchartocp(unsigned int code_page, const wchar_t *filename_w, > *filename = NULL; > return 0; > } > - *filename = av_malloc_array(num_chars, sizeof *filename); > + *filename = (char*)av_malloc_array(num_chars, sizeof *filename); > if (!*filename) { > errno = ENOMEM; > return -1; > -- > 2.34.1 LGTM, thanks! // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".