From patchwork Mon Dec 17 13:30:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 11448 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 A829944C662 for ; Mon, 17 Dec 2018 15:30:46 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CBF3C68A8F1; Mon, 17 Dec 2018 15:30:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EE54C68A669 for ; Mon, 17 Dec 2018 15:30:39 +0200 (EET) Received: by mail-io1-f67.google.com with SMTP id r200so9942809iod.11 for ; Mon, 17 Dec 2018 05:30:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=8/bR9KRJ+s0A970CG3x1Iqo8wB8DmL6Yhre2CxO5HZc=; b=KYpybyF9gjJia+GxV56rPntDzqBsi2ijw6Jey4+fFLEWEGe7ipntOPFDY5Gr/49eZR xRYMXak3f4jpHT22sGJubam9lZiP9jovZF03q2OnFMcE8PRzD3/9nQW+FcX6bTxvJc94 qzEqFzz36UnUmMVUgfaclYy+hKRB0NMGiX1111Z+DHxCaS+yOe/eUUjbNKkexUZvMDP3 Md9ahUrq4juTAKUUTKe+lkTdSQFisS2T9kg6lEVV3M8O7UyPMwpA+clgDYzlbu/p9HGk zEfjhIm71SNFJ2WpBvpOn478GEpd0mrXF8p6RYh6cJxGnAfjju50xw/pQml+OwBhkz26 TR/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=8/bR9KRJ+s0A970CG3x1Iqo8wB8DmL6Yhre2CxO5HZc=; b=Sk3cpRYPDxiqyYyi4Q9QXAPCDQb7y082eMQQiQI9NUYBOA+oPSjvodR7DF5mNb0Wv8 ZFOCVRiTp9sDQB0bqjiuu/NgjBpUWKGL2EEV2SpQAwSJRMkZJJm0q4/NzEahqRYywmtT YDDjyxv67/FnnQQygOzaRHnN4ZuCLUhSmtg1hTR4mcPxJV5bUjsUtINMjadOMe+pUzMB IRxe4sYs4760kAZRbDGdOn100IC50lfiArSQcTzCRnWt7b/qGG2wv14meFkWLOtd4GBX u5va9ug18ae9evrLueEblc1OMocW3a2D1OtTYL0ggJSAt9QF//SoSHAm+r/FnJmrjEi0 /CUg== X-Gm-Message-State: AA+aEWYuOk/IeT47f2o8H47f9Rh+cnO6HqblkAmDFDQ8x0FUKpM/AzZZ nL2/a65lA1+3mjhArPhQVzxH3woDXTFQX9j/tOESNQ== X-Google-Smtp-Source: AFSGD/XLnLYIvF7ALU2ytStl9xX6x8+7nCJS5Uvtg9E2yu346pZnoMMD1uEp6JPqTPUQXdqjTzSfU8pK+sgRiB8Bgxg= X-Received: by 2002:a5d:8347:: with SMTP id q7mr1332416ior.49.1545053439262; Mon, 17 Dec 2018 05:30:39 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:5f11:0:0:0:0:0 with HTTP; Mon, 17 Dec 2018 05:30:37 -0800 (PST) In-Reply-To: <20181217122400.GB3501@michaelspb> References: <20181217122400.GB3501@michaelspb> From: Carl Eugen Hoyos Date: Mon, 17 Dec 2018 14:30:37 +0100 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH]lsws/utils: Split "emms_c(); " call in two lines 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" 2018-12-17 13:24 GMT+01:00, Michael Niedermayer : > On Mon, Dec 17, 2018 at 02:14:26AM +0100, Carl Eugen Hoyos wrote: >> Hi! >> >> Attached patch fixes a useless warning when compiling with clang on arm. >> >> Please comment, Carl Eugen > >> utils.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> fb6799bbc59d79d9dfba9f8661aaecbed568f3a5 >> 0001-lsws-utils-Split-emms_c-in-two-lines.patch >> From b2773d1ca9473380b99400c2bbd5a6729622f51a Mon Sep 17 00:00:00 2001 >> From: Carl Eugen Hoyos >> Date: Mon, 17 Dec 2018 02:12:13 +0100 >> Subject: [PATCH] lsws/utils: Split "emms_c();" in two lines. >> >> Silences a clang warning when not compiling for x86: >> libswscale/utils.c:345:13: warning: while loop has empty body >> --- >> libswscale/utils.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libswscale/utils.c b/libswscale/utils.c >> index df68bcc..de64694 100644 >> --- a/libswscale/utils.c >> +++ b/libswscale/utils.c >> @@ -342,7 +342,8 @@ static av_cold int initFilter(int16_t **outFilter, >> int32_t **filterPos, >> const int64_t fone = 1LL << (54 - FFMIN(av_log2(srcW/dstW), 8)); >> int ret = -1; >> >> - emms_c(); // FIXME should not be required but IS (even for non-MMX >> versions) >> + emms_c() // FIXME should not be required but IS (even for non-MMX >> versions) >> + ; > > this looks like a bad change that could confuse people > i think a different solution should be found or the warning > left if theres none New patch attached. Please comment, Carl Eugen From 67f692d81792920f5344ceba239f64b2b9b4bec1 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 17 Dec 2018 14:28:35 +0100 Subject: [PATCH] lavu/internal: Add an empty body to "while(0)". Fixes a clang warning if arch != x86: libswscale/utils.c:345:13: warning: while loop has empty body --- libavutil/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/internal.h b/libavutil/internal.h index 06bd561..2a6e502 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -52,7 +52,7 @@ #endif #ifndef emms_c -# define emms_c() while(0) +# define emms_c() while(0){} #endif #ifndef attribute_align_arg -- 1.7.10.4