From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A994C43603 for ; Mon, 16 Dec 2019 13:05:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 353E7206A5 for ; Mon, 16 Dec 2019 13:05:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Dupsu2O3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 353E7206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igq3Y-0004Qb-87 for qemu-devel@archiver.kernel.org; Mon, 16 Dec 2019 08:05:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38061) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igq2e-0003eH-Po for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:04:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igq2b-0002MG-I2 for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:04:02 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:48626 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1igq2b-0002Lu-DB for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:04:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576501440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ycNJVlpeKBG3huxdA7o07iOUJ3mnVsthkN4USpcvP9g=; b=Dupsu2O3FDkPB6aH1iKkr6IKw56ocY4nDkDvZdzsR2yIXgapPoF+jxYeKQqpUhzj4w6JaQ O9NYO2pGg9ao4YE16ADHWctIVFZlZfQk6+GnJlepDuIpfhzEBFWWgKONvwUmV1v3Jk0iYO 2nARqrrM4aoMuTEiUO1UVkKhQFk7p8s= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-144--ejA2iBFPoiE4DQWawPqFQ-1; Mon, 16 Dec 2019 08:03:59 -0500 Received: by mail-wm1-f70.google.com with SMTP id y125so1045903wmg.1 for ; Mon, 16 Dec 2019 05:03:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ycNJVlpeKBG3huxdA7o07iOUJ3mnVsthkN4USpcvP9g=; b=jiGdrRfIE7eHJq5A9cDZlsMQCtX41Z3NhVf+O7J41U7cC0ytioICShlNR2sgxUvw77 M8s4CGpWn15dgdkOUefUb5JPbj/iELNnk4bL60lM+xpI6r+OfMhKe+XaFpZ40FLymwYK Nye8xxjaJiRctCVzfVNbqES2nWJ/SyOiFxqmnOxp346ambw3N0WGYta7eyt7tO8vk0Hw XOMz4HSSpPbAK190Ajlf5y3ZzK9r7d72Up5FXhw7VBvtLP3fK9DqV86V1htCVJh+klVh ZttrGgKz70YQXYYkPWd7fXr4gAnjvdtcZ3z69iu/RgjUA8LVS+r8++kDyuaU/0Qr4rlA KWlg== X-Gm-Message-State: APjAAAXF91V9IRqqYE8Hiwh4NFH/GyQFaiqDL5tmhhy8JowFrOcqSyQB 5mMk2FrK+Ae/JLGmuqFcgMGHglgthm+4Ekv+b/lVDnl+fz7FWEOHJqojSjlp/KcUfdGcUz0fPp7 pkX2dSgelJOWSMrw= X-Received: by 2002:a5d:52c4:: with SMTP id r4mr28498675wrv.368.1576501438049; Mon, 16 Dec 2019 05:03:58 -0800 (PST) X-Google-Smtp-Source: APXvYqysWhvVMejCKhbmdN1NBtEkkGBF9rdhZZw2AfBTQjuxs0lZvKS04Omshql8yFWPBVX50xVzGQ== X-Received: by 2002:a5d:52c4:: with SMTP id r4mr28498653wrv.368.1576501437823; Mon, 16 Dec 2019 05:03:57 -0800 (PST) Received: from [192.168.1.35] (34.red-83-42-66.dynamicip.rima-tde.net. [83.42.66.34]) by smtp.gmail.com with ESMTPSA id 25sm19613769wmi.32.2019.12.16.05.03.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 16 Dec 2019 05:03:57 -0800 (PST) Subject: Re: [Bug 1856549] Re: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ? To: Bug 1856549 <1856549@bugs.launchpad.net>, qemu-devel@nongnu.org References: <157649490094.7480.17075229014510714852.malonedeb@soybean.canonical.com> <157649752475.4226.12810383033052233683.malone@chaenomeles.canonical.com> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Message-ID: <47476c59-c7a1-b65e-bb20-79dad784cdde@redhat.com> Date: Mon, 16 Dec 2019 14:03:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 In-Reply-To: <157649752475.4226.12810383033052233683.malone@chaenomeles.canonical.com> Content-Language: en-US X-MC-Unique: -ejA2iBFPoiE4DQWawPqFQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 12/16/19 12:58 PM, dcb wrote: > gcc compiler flag -Wduplicated-cond will catch this kind of problem. Interesting, thanks for sharing! > > You might want to switch it on in your builds. It has been available for > over a year. > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13ABFC43603 for ; Mon, 16 Dec 2019 13:17:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCBDC20684 for ; Mon, 16 Dec 2019 13:17:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCBDC20684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bugs.launchpad.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:53613 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igqG5-0007Xy-ND for qemu-devel@archiver.kernel.org; Mon, 16 Dec 2019 08:17:57 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41983) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igqDt-000666-QY for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:15:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igqDs-0003oh-Dz for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:15:41 -0500 Received: from indium.canonical.com ([91.189.90.7]:49100) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igqDs-0003lb-7m for qemu-devel@nongnu.org; Mon, 16 Dec 2019 08:15:40 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1igqDq-0007dP-Eq for ; Mon, 16 Dec 2019 13:15:38 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 6D11B2E80C0 for ; Mon, 16 Dec 2019 13:15:38 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Mon, 16 Dec 2019 13:03:55 -0000 From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <1856549@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: dcb314 philmd X-Launchpad-Bug-Reporter: dcb (dcb314) X-Launchpad-Bug-Modifier: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9_=28philmd?= =?utf-8?q?=29?= References: <157649490094.7480.17075229014510714852.malonedeb@soybean.canonical.com> <157649752475.4226.12810383033052233683.malone@chaenomeles.canonical.com> Message-Id: <47476c59-c7a1-b65e-bb20-79dad784cdde@redhat.com> Subject: Re: [Bug 1856549] Re: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ? X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="c597c3229eb023b1e626162d5947141bf7befb13"; Instance="production-secrets-lazr.conf" X-Launchpad-Hash: 6f249a26f52057315fc22640b81018f36d7d5094 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 91.189.90.7 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1856549 <1856549@bugs.launchpad.net> Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Message-ID: <20191216130355.OgpKdPIIa9d0u9L9ruTFemcpYhk5aQSbqhFDU-TxrHo@z> On 12/16/19 12:58 PM, dcb wrote: > gcc compiler flag -Wduplicated-cond will catch this kind of problem. Interesting, thanks for sharing! > = > You might want to switch it on in your builds. It has been available for > over a year. > -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1856549 Title: qemu-4.2.0/hw/misc/mac_via.c: 2 * bad test ? Status in QEMU: New Bug description: 1. qemu-4.2.0/hw/misc/mac_via.c:417:27: style: Expression is always false because 'else if' condition matches previous condition at line 412. [multiCondition] } else if ((m->data_out & 0xf3) =3D=3D 0xa1) { ... } else if ((m->data_out & 0xf3) =3D=3D 0xa1) { 2. qemu-4.2.0/hw/misc/mac_via.c:467:27: style: Expression is always false because 'else if' condition matches previous condition at line 463. [multiCondition] Duplicate. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1856549/+subscriptions