From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 CDC8021DFA8FE for ; Thu, 30 Mar 2017 10:33:54 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2F38441A2C; Thu, 30 Mar 2017 17:33:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2F38441A2C Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2F38441A2C Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-143.phx2.redhat.com [10.3.116.143]) by smtp.corp.redhat.com (Postfix) with ESMTP id 760E417ADA; Thu, 30 Mar 2017 17:33:50 +0000 (UTC) To: Qin Long , edk2-devel@lists.01.org, Gerd Hoffmann References: <20170323131932.6168-1-qin.long@intel.com> <20170323131932.6168-8-qin.long@intel.com> Cc: ard.biesheuvel@linaro.org, ting.ye@intel.com, ronald.cron@arm.com, jiaxin.wu@intel.com, glin@suse.com From: Laszlo Ersek Message-ID: Date: Thu, 30 Mar 2017 19:33:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170323131932.6168-8-qin.long@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 30 Mar 2017 17:33:54 +0000 (UTC) Subject: Re: [PATCH v2 07/11] CryptoPkg: Clean-up CRT Library Wrapper. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2017 17:33:55 -0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Qin, this patch (commit fc9fa685d689c) seems to break *some* GCC builds: On 03/23/17 14:19, Qin Long wrote: [snip] > +/* Compare first n bytes of string s1 with string s2, ignoring case */ > +int strncasecmp (const char *s1, const char *s2, size_t n) > +{ > + int Val; > + > + ASSERT(s1 != NULL); > + ASSERT(s2 != NULL); Here. The error messages are: CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c: In function 'strncasecmp': MdePkg/Include/Library/DebugLib.h:292:12: error: nonnull argument 's1' compared to NULL [-Werror=nonnull-compare] if (!(Expression)) { \ ^ CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c:144:3: note: in expansion of macro 'ASSERT' ASSERT(s1 != NULL); ^~~~~~ MdePkg/Include/Library/DebugLib.h:292:12: error: nonnull argument 's2' compared to NULL [-Werror=nonnull-compare] if (!(Expression)) { \ ^ CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c:145:3: note: in expansion of macro 'ASSERT' ASSERT(s2 != NULL); ^~~~~~ The GCC documentation says, -Wnonnull-compare Warn when comparing an argument marked with the nonnull function attribute against null inside the function. -Wnonnull-compare is included in -Wall. It can be disabled with the -Wno-nonnull-compare option. I have no idea where the compiler thinks "s1" and "s2" are marked as non-null. I grepped the tree for "nonnull" and there are no hits. Gerd, what compiler are you using? (From your logs, it looks like OVMF is being built for IA32, with the GCC49 tool chain settings.) Thanks Laszlo