From patchwork Fri May 5 07:26:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 3576 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.3.129 with SMTP id 123csp79260vsd; Fri, 5 May 2017 00:26:37 -0700 (PDT) X-Received: by 10.223.135.130 with SMTP id b2mr29165080wrb.48.1493969197766; Fri, 05 May 2017 00:26:37 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a197si1906476wma.151.2017.05.05.00.26.37; Fri, 05 May 2017 00:26:37 -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=@gmail.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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 368C26899FC; Fri, 5 May 2017 10:26:30 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C2423680545 for ; Fri, 5 May 2017 10:26:22 +0300 (EEST) Received: by mail-it0-f41.google.com with SMTP id o5so16426105ith.1 for ; Fri, 05 May 2017 00:26:27 -0700 (PDT) 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=rla9sm4pQOzYqP2l4hO5Zt9/ho6EHJ5L0ebYwn3eNWk=; b=X1BtTTZU6rACh5HqjGxALCf9c2uNcH2CtIsYDWZzFHTyzVfj2arPkOQ8PEEbE5wBUZ m4divzQhAgQxG+HHrnEQPr1z0WYCXk1NhHD1IzTVv1LcBt/jguRzMtdEqsYNpRN9QGcn 8UkP08wyvYZ0Pk9RExoKR704ZIXwYXwezGX9x5PcNDGVKK6Qv4TvfaNaPbyicMQNxqhU J54Tq0yizX0zMEOki15RG5r7BqLQBpxwms3vVk2DGcxhghcznpLmWWAW+a+ZS+bpkYcm DTr4fL8bgYkfLBnsO88YQ4ZoEtSHjh8UrV4/n1Wm8tlfT/xjUckVkgYChxeBLgpFExS5 S1yg== 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=rla9sm4pQOzYqP2l4hO5Zt9/ho6EHJ5L0ebYwn3eNWk=; b=nll3UIW/D1Bj2TKGC9/KmMktp8p/178liRokDTspb0tXwSxxO7EYvj6tqIz2bzx+gA vWqs+GynpPXeQYr0xhePU2fhFQTPQVZQuebtcvEw/I2YY5PS3AWOhqmSh8M7onbrfPUl HMNu/iUBd9sIi7aTmMy0izeDSterERDypYUyklBOsKlVB3UfXRHKR4tRXzIOQmcGulXv 6wy//r3QnKcxW7E0HtF3GujD6OZ0uQNsOuNcLI263G4wXtFYCS1Ei5uYHBaGwSsqUeOx O6Vuwg8aG5dU2PNx0JHMkAMNbcbJum9vIgfBBX4bp1Dip8Aj2x1NkyEy8Tqs8l2wnRk/ K3eg== X-Gm-Message-State: AN3rC/7i+NlpqbscmTLthqS+Wwirdd1zQL/LZcSDYyMq7KVvCpktTANV MbIsz8xVbm+8tq6rH2xNc3DDKgISeg== X-Received: by 10.36.101.210 with SMTP id u201mr6360144itb.118.1493969186301; Fri, 05 May 2017 00:26:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.79.116.211 with HTTP; Fri, 5 May 2017 00:26:05 -0700 (PDT) In-Reply-To: <08555082-706b-1e28-806d-44968c14106e@aracnet.com> References: <201705050132.45109.cehoyos@ag.or.at> <08555082-706b-1e28-806d-44968c14106e@aracnet.com> From: Carl Eugen Hoyos Date: Fri, 5 May 2017 09:26:05 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [RFC]lavu/opt: Use && instead of * in boolean expression 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" 2017-05-05 3:12 GMT+02:00 Aaron Levinson : > On 5/4/2017 4:32 PM, Carl Eugen Hoyos wrote: >> Hi! >> >> It may be better to disable the warning. >> >> Carl Eugen >> >> - num = den ? num * intnum / den : (num * intnum ? INFINITY : NAN); >> + num = den ? num * intnum / den : (num && intnum ? INFINITY : NAN); > > In order to preserve the original logic, why not do the following: > > + num = den ? num * intnum / den : (((num * intnum) != 0) ? INFINITY : NAN); Simpler patch attached. Carl Eugen From 65811b8d63aee1bb02dc3d379bfba74b72524e67 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 5 May 2017 09:24:28 +0200 Subject: [PATCH] configure: Silence a less useful warning. Silences the following warning: warning: '*' in boolean context, suggest '&&' instead [-Wint-in-bool-context] --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 804b0ce..bb969f0 100755 --- a/configure +++ b/configure @@ -6116,6 +6116,7 @@ check_cflags -Wmissing-prototypes check_cflags -Wno-pointer-to-int-cast check_cflags -Wstrict-prototypes check_cflags -Wempty-body +check_cflags -Wno-int-in-bool-context if enabled extra_warnings; then check_cflags -Wcast-qual -- 1.7.10.4