From patchwork Tue Jan 9 01:16:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Devin Heitmueller X-Patchwork-Id: 7225 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.78.2 with SMTP id r2csp3355723jaa; Mon, 8 Jan 2018 18:07:19 -0800 (PST) X-Google-Smtp-Source: ACJfBovM9wptOzrEw799dD7hjxWTc7i1HsP14oQll43Ty9k11ehsw24aYUpyYejO8M643h7icInB X-Received: by 10.223.182.161 with SMTP id j33mr4885560wre.43.1515463639035; Mon, 08 Jan 2018 18:07:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515463639; cv=none; d=google.com; s=arc-20160816; b=R9lqvdoaiP/Js45cJ+ssZeR3SkwppUmhKcQAfsuxxvGNv63+UKgisijynSWuqxJICm 0olkpofC/DFqVo4+JdkV8Bds037+keghU6vnCFd0+A7EN3EGsFnUYKxOUwyBpQzdvNuP e65Plb8M9UJdthrCNjCh5KeCgNpHAewSXBhqmLaYsbZgQ6N2Z8BoQiaz9Pz0rtJa/+Gs yy9Ni9OJisgM5dJaUtEc1H7j2EjK/ItGtwsyJzbnlrgukjrf7ZW2puK/+NQwnB75dU6Y tRqmBxCtgSa6OX1W9TDow8E7pi1FEETE5ir1meBpWNrws8ituYv0e1ZgzYoTRypICX2P ppMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:delivered-to:arc-authentication-results; bh=h2RdQA9bhxVybvV9mcdKe4P+unIIu1LE/FYmOrM2Qmw=; b=flU1xmFgT3arvXeeZ3U3yoY/2NVu1I+wqo5KXfoI6DwhsG3/QBH0Pk9zb9Z8bLOdik /j/oztO1a8Uyy0LwykFzyLmnBDoMzvcbD+HTC8JMVcu2QzNjlAvEMqSeGobwVQhDDF/E iZAhgZ7aCiICyaCHY+83r57dcnEG8DM36YnZR/tsdhxWCpqOmFrSRJrREmdMh/qoVyur fd2DYkGDNuVPaqfAQGTAWMbjLCnPnrZk/oxz40Zh4RUyC5uRDdhuG5sGJJFdkLFI9Qb/ awrogv/CsBXn1nUFkXz2h3vtJ5xuF9ldZu1+CUlB7gmArJfSdNsPopgs35Dr03/7QVk/ 7bPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m13si8738023wmh.134.2018.01.08.18.07.18; Mon, 08 Jan 2018 18:07:18 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 517D0689FF7; Tue, 9 Jan 2018 04:07:16 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from was-smtp1.livetimenet.net (50-206-97-56-static.hfc.comcastbusiness.net [50.206.97.56]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4743A689EB1 for ; Tue, 9 Jan 2018 04:07:10 +0200 (EET) Received: by was-smtp1.livetimenet.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.84_2) (envelope-from ) id 1eYiXl-0008Fd-4I; Mon, 08 Jan 2018 20:17:34 -0500 From: Devin Heitmueller To: ffmpeg-devel@ffmpeg.org Date: Mon, 8 Jan 2018 20:16:58 -0500 Message-Id: <20180109011658.72370-12-dheitmueller@ltnglobal.com> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20180109011658.72370-1-dheitmueller@ltnglobal.com> References: <20180109011658.72370-1-dheitmueller@ltnglobal.com> X-Spam-Score: -1.9 (-) Subject: [FFmpeg-devel] [PATCH 11/11] decklink: Fix compilation of module on OSX 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: jgreen@ltnglobal.com, Devin Heitmueller MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Clang applies the missing-prototypes warning on C++ files, whereas gcc only applies it to C. As a result, the decklink_common.cpp file fails to build because of missing prototypes in DecklinkDispatch.cpp (which is #included by decklink_common.cpp). We don't want to change the actual Blackmagic SDK sources, so suppress the warning just for that one #include. Signed-off-by: Devin Heitmueller --- libavdevice/decklink_common.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavdevice/decklink_common.cpp b/libavdevice/decklink_common.cpp index b033e63..c0b3c93 100644 --- a/libavdevice/decklink_common.cpp +++ b/libavdevice/decklink_common.cpp @@ -29,7 +29,18 @@ extern "C" { #ifdef _WIN32 #include #else +/* The file provided by the SDK is known to be missing prototypes, which doesn't + cause issues with GCC since the warning doesn't apply to C++ files. However + Clang does complain (and warnings are treated as errors), so suppress the + warning just for this one file */ +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wmissing-prototypes" +#endif #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif #endif extern "C" {