From patchwork Sat Nov 4 00:13:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dale Curtis X-Patchwork-Id: 5853 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.90 with SMTP id m26csp454758jah; Fri, 3 Nov 2017 17:22:18 -0700 (PDT) X-Google-Smtp-Source: ABhQp+QYO3PEQWISPNVyDWUVTRzfcfsHQA/eqo3dVfiYvk7Vp6NfbL6xTzz5K8IoicARq4yPSC2d X-Received: by 10.223.176.183 with SMTP id i52mr7713018wra.257.1509754938260; Fri, 03 Nov 2017 17:22:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509754938; cv=none; d=google.com; s=arc-20160816; b=QvfH5FqhurZ6kkwB/MIenxR2T92nHCWI60ScmTOGxuI3nQ0DdSlJAJ6syxPRR36i/k XSUJaLmNNe5XxFFW2BJXuFqjq6OB3cy2HG/ydm9iNg2Noxj+lX/V3CjkhddJ5SDA9/m6 JQ0Y1VDkZpB8cAeOvwhc+hx5B4ydo4PfgrD49th8Lc6vh8mT89IA9UMMlPvdqneRAeSg y3SgwOzn/SR7+g4RwpnoMyixiTL7QjrBa5zHlJbk9lCMr7a3bmwi4MHZf664VBrZgtu5 aWGnW1lX6azq6noPdAHUfpuCFEYDRmvbdD2IxEcXIhRU3vsjgoAsetqM4NMMun9r6+Xh RNxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:dkim-signature :delivered-to:arc-authentication-results; bh=t4/XyJv+qU0Hbjf5EGKZRpRV48vrO3kYSNZV50LQwJo=; b=reIiNWnURGzo1s5YUOhOEiTyswB2XBQ40/7ahDZZwZl4JkO9khE0WZTT1Ci7C/YHlw NsZ2PrgqNUQ1dCfe1eK1BeZz/t1fsHTasbBhTCkRzMyvoE2E3rBVD8TFgKGBnxbmS7t8 bdciaDljEnUK8kKlS0yCv9ax+mUEwO2xZoeMvMo/ynxM/R3mtVdr9Z3eVKcyOSKS1fQ9 lSin6D82mbbOaEjwvBHKnK/S2AVXUp8Se4lTEygfZrEw1vdP4LOapkEC0PN+6o+SNDvi QVzkix758cuj4MMRhtiF+tgUZvUfh/rslrMr6NS0c/ewx64PK7kCa5ZO9pcnZUOMybi2 T2Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=BhneayHW; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=N6qvVuxk; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w103si6011268wrc.2.2017.11.03.17.22.17; Fri, 03 Nov 2017 17:22:18 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@google.com header.s=20161025 header.b=BhneayHW; dkim=neutral (body hash did not verify) header.i=@chromium.org header.s=google header.b=N6qvVuxk; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E994D689E71; Sat, 4 Nov 2017 02:22:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr0-f179.google.com (mail-wr0-f179.google.com [209.85.128.179]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BE9D9689C69 for ; Sat, 4 Nov 2017 02:21:59 +0200 (EET) Received: by mail-wr0-f179.google.com with SMTP id w105so3871019wrc.0 for ; Fri, 03 Nov 2017 17:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=1WVK6YvHRXZU5HVMYKXkB9bKJ2BIemU0DSj3L4dpOAw=; b=BhneayHWEG1CRBKBJABF2X6ToOfLf4SSKqG7OiUEKXxwqxIOQbRxow4UgS4ElysfzX mtufsyUJLjB+F6C+ciA9gt2eyutYg3ABUljwwZlX4TOXwNSqmDzjYIUTIIyR79FUwHhC 1ibOfdMfANfCQ9z8vcrnuOXUx8HTdKWKrSpm9fRwzcnWfFOl0zvEK17JRRPJnmfmPDJP nSsU+/r6nhc3uuXEZNFLRJbIXqu+u9BXZLF2KFT1boWM0z0QWxlHEzRQybwmbqj6l05/ wdlQD8QzAzGYbDEJFx5WnDG5rPJtZ9+Oc/Vtimp+fXJhH3wXqefuk5b0KNvzHbLcSA7H VvXA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:sender:from:date:message-id:subject:to; bh=1WVK6YvHRXZU5HVMYKXkB9bKJ2BIemU0DSj3L4dpOAw=; b=N6qvVuxkvmCiYFPYngw5fSLfO5KMjN8NM6qcQ45vID5id+lz/IpJUrF2ehRHMxuD/n B3vY8Q6OC+GwOULcV7QruvIq1/YLS+vyU8/XC9HokaKWWigTsXZdu9tOMetOzZUJkUFj 4sNYe7uiioaZdyeiLShEvynVrlM9ZjWoQt/yU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=1WVK6YvHRXZU5HVMYKXkB9bKJ2BIemU0DSj3L4dpOAw=; b=BMzNqL8brXZgvX9gULhDcx/j30CoqM1K41QBewhK/uWGO0i/aIcvnx3Ib2+3EX3qBd jFabpbeScOR5UnLTW1HFDWv94+GmsbM1T5NjKgvPKzzY/DBa1vt6WEWzhWY9+lTuccZX Ap69ukAaspAnx92bWNOieO0IQS4vtNlBf23PpVFEi03S3WJ2jcomdqZGoLos02l4UbX8 qGv5TzCcJt+PmWYfdRbcsYj8+wDeA4Hm7QAm1WfohEVkLEeNfvvt56TJ03gxEm17eJs/ T9FK6V9rAkAY2Wbbc4t2bsur1It6MOmuV5fXfLAnKMXWh1Bkg0K03JejnONvFw5yoj8D x51w== X-Gm-Message-State: AMCzsaXH/X14jnyPbGGkVZOMVSYdoSFwxysDc60v/iZgOohYQY52D6dB Xss8/eRhZaJ07QS0bGNgbbH7pFxFbHzUd8HiZ0ped+ZeAEk= X-Received: by 10.223.176.115 with SMTP id g48mr7978526wra.177.1509754459950; Fri, 03 Nov 2017 17:14:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.63.19 with HTTP; Fri, 3 Nov 2017 17:13:58 -0700 (PDT) From: Dale Curtis Date: Fri, 3 Nov 2017 17:13:58 -0700 X-Google-Sender-Auth: Ky_ErxUsyDWlolbH7eNj4vijdNY Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] Avoid corrupting diagnostic state with _Pragma changes. 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The macros for ICC and MSVC correctly push and pop the diagnostic state of the compiler when disabling deprecation warnings. The ones for clang/gcc should do the same. Without this, if a blanket deprecation warning is applied to the code base it'll be flipped back on incorrectly with FF_ENABLE_DEPRECATION_WARNINGS. Signed-off-by: Dale Curtis From 73a488e07a328d05aa2b507a551b0c1e4b8a81c8 Mon Sep 17 00:00:00 2001 From: Dale Curtis Date: Fri, 3 Nov 2017 17:10:55 -0700 Subject: [PATCH] Avoid corrupting diagnostic state with _Pragma changes. The macros for ICC and MSVC correctly push and pop the diagnostic state of the compiler when disabling deprecation warnings. The ones for clang/gcc should do the same. Without this, if a blanket deprecation warning is applied to the code base it'll be flipped back on incorrectly with FF_ENABLE_DEPRECATION_WARNINGS. Signed-off-by: Dale Curtis --- libavutil/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/internal.h b/libavutil/internal.h index 6f92f71e8e..3e6c54e58a 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -77,8 +77,8 @@ # define FF_DISABLE_DEPRECATION_WARNINGS __pragma(warning(push)) __pragma(warning(disable:4996)) # define FF_ENABLE_DEPRECATION_WARNINGS __pragma(warning(pop)) # else -# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") -# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic warning \"-Wdeprecated-declarations\"") +# define FF_DISABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +# define FF_ENABLE_DEPRECATION_WARNINGS _Pragma("GCC diagnostic pop") # endif #else # define FF_DISABLE_DEPRECATION_WARNINGS -- 2.15.0.403.gc27cc4dac6-goog