From patchwork Thu Jun 30 21:05:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 71273 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp594479qgy; Thu, 30 Jun 2016 14:05:34 -0700 (PDT) X-Received: by 10.98.18.9 with SMTP id a9mr25328990pfj.14.1467320734247; Thu, 30 Jun 2016 14:05:34 -0700 (PDT) Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id l24si234710pfj.19.2016.06.30.14.05.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2016 14:05:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 07CDF1A1E21; Thu, 30 Jun 2016 14:06:10 -0700 (PDT) X-Original-To: edk2-devel@ml01.01.org Delivered-To: edk2-devel@ml01.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 86B501A1E20 for ; Thu, 30 Jun 2016 14:06:08 -0700 (PDT) Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9EE63619FF; Thu, 30 Jun 2016 21:05:31 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-60.phx2.redhat.com [10.3.116.60]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5UL5Tik016219; Thu, 30 Jun 2016 17:05:30 -0400 From: Laszlo Ersek To: edk2-devel-01 Date: Thu, 30 Jun 2016 23:05:25 +0200 Message-Id: <1467320725-30016-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 30 Jun 2016 21:05:31 +0000 (UTC) Subject: [edk2] [PATCH] ShellPkg: UefiHandleParsingLib: remove tautological comparison X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Jaben Carsey , Michael Zimmermann , Ard Biesheuvel MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" The code being removed in this patch dates back to git commit a405b86d274d (Sep 14, 2010; "udk2010.up2.shell initial release."). The condition always evaluates to true, and it breaks DEBUG builds of ArmVirtPkg with gcc-6.1: ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c: In function 'ParseHandleDatabaseByRelationshipWithType': ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c:2465:76: error: self-comparison always evaluates to true [-Werror=tautological-compare] ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]); Cc: Ard Biesheuvel Cc: Gerd Hoffmann Cc: Jaben Carsey Cc: Michael Zimmermann Reported-by: Gerd Hoffmann Reported-by: Michael Zimmermann Suggested-by: Jaben Carsey Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/13794/focus=13939 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 4 ---- 1 file changed, 4 deletions(-) -- 1.8.3.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index b82f925c9218..63710865251d 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -2460,10 +2460,6 @@ ParseHandleDatabaseByRelationshipWithType ( (*HandleType)[HandleIndex] |= (UINTN)HR_COMPONENT_NAME_HANDLE; } else if (CompareGuid (ProtocolGuidArray[ProtocolIndex], &gEfiDevicePathProtocolGuid) ) { (*HandleType)[HandleIndex] |= (UINTN)HR_DEVICE_HANDLE; - } else { - DEBUG_CODE_BEGIN(); - ASSERT((*HandleType)[HandleIndex] == (*HandleType)[HandleIndex]); - DEBUG_CODE_END(); } // // Retrieve the list of agents that have opened each protocol