From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 8060921A04820 for ; Thu, 30 Mar 2017 19:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490926008; x=1522462008; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=EkIaRgRYJ1HOHNX6o74CUHoOM3HN6xZGSODR3/xi2wE=; b=urDxYA4YB0ygnRBi144oT/7xhzrsEgB9qs3zT5iJn8QBxKpuOwNKlJhs 91dusOxYGi7XSpO+AYC20q7U08Ir9Q==; Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2017 19:06:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,250,1486454400"; d="scan'208";a="72086399" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga004.jf.intel.com with ESMTP; 30 Mar 2017 19:06:47 -0700 Received: from fmsmsx123.amr.corp.intel.com (10.18.125.38) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Mar 2017 19:06:46 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx123.amr.corp.intel.com (10.18.125.38) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 30 Mar 2017 19:06:46 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.253]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.224]) with mapi id 14.03.0248.002; Fri, 31 Mar 2017 10:06:44 +0800 From: "Long, Qin" To: Laszlo Ersek , "edk2-devel@lists.01.org" , Gerd Hoffmann CC: "Ye, Ting" , "ronald.cron@arm.com" , "Wu, Jiaxin" , "glin@suse.com" , "ard.biesheuvel@linaro.org" Thread-Topic: [edk2] [PATCH v2 07/11] CryptoPkg: Clean-up CRT Library Wrapper. Thread-Index: AQHSqXvTnjVNOUb5wkKz+JKcXd82g6GuMNjw Date: Fri, 31 Mar 2017 02:06:43 +0000 Message-ID: References: <20170323131932.6168-1-qin.long@intel.com> <20170323131932.6168-8-qin.long@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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: Fri, 31 Mar 2017 02:06:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Laszlo, Thanks for catching this. I was using GCC5 toolchain for few validations, the build looks OK.=20 Yes, should have more toolchain validations. :-( I am also confused about this nonull warning. Maybe strncasecmp function=20 could have been defined as the different prototype (explicitely or implicit= ely): int strcasecmp(const char *s1, const char *s2) __attribute__((nonnull)); And there was also one extra build warning (on openssl source) under GCC48. Let me dig more and provide possible fixes to address this later. Best Regards & Thanks, LONG, Qin > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Laszlo Ersek > Sent: Friday, March 31, 2017 1:34 AM > To: Long, Qin; edk2-devel@lists.01.org; Gerd Hoffmann > Cc: Ye, Ting; ronald.cron@arm.com; Wu, Jiaxin; glin@suse.com; > ard.biesheuvel@linaro.org > Subject: Re: [edk2] [PATCH v2 07/11] CryptoPkg: Clean-up CRT Library > Wrapper. >=20 > Qin, >=20 > this patch (commit fc9fa685d689c) seems to break *some* GCC builds: >=20 > On 03/23/17 14:19, Qin Long wrote: >=20 > [snip] >=20 > > +/* 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 !=3D NULL); > > + ASSERT(s2 !=3D NULL); >=20 > Here. The error messages are: >=20 > CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c: In function > 'strncasecmp': > MdePkg/Include/Library/DebugLib.h:292:12: error: nonnull argument 's1' > compared to NULL [-Werror=3Dnonnull-compare] > if (!(Expression)) { \ > ^ > CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c:144:3: note: in > expansion of macro 'ASSERT' > ASSERT(s1 !=3D NULL); > ^~~~~~ > MdePkg/Include/Library/DebugLib.h:292:12: error: nonnull argument 's2' > compared to NULL [-Werror=3Dnonnull-compare] > if (!(Expression)) { \ > ^ > CryptoPkg/Library/BaseCryptLib/SysCall/CrtWrapper.c:145:3: note: in > expansion of macro 'ASSERT' > ASSERT(s2 !=3D NULL); > ^~~~~~ >=20 > The GCC documentation Options.html> says, >=20 > -Wnonnull-compare >=20 > Warn when comparing an argument marked with the nonnull function > attribute against null inside the function. >=20 > -Wnonnull-compare is included in -Wall. It can be disabled with the= -Wno- > nonnull-compare option. >=20 > 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. >=20 > Gerd, what compiler are you using? (From your logs, it looks like OVMF is > being built for IA32, with the GCC49 tool chain settings.) >=20 > Thanks > Laszlo >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel