From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:400c:c09::241; helo=mail-wm0-x241.google.com; envelope-from=pete@akeo.ie; receiver=edk2-devel@lists.01.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 36C5722161143 for ; Wed, 14 Feb 2018 07:40:24 -0800 (PST) Received: by mail-wm0-x241.google.com with SMTP id a84so12218470wmi.5 for ; Wed, 14 Feb 2018 07:46:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NZXz4+mtj5flRf6qKyGbpYRNQ7VdwFmgFuQKgnqMeik=; b=Z5wHixVl1xvqtPlP4QvIrL937VI7GRbYw9qQRSCwogekCIjNke1y4qs0cmGNZMFR6E UyTYj3ogbnsb3gAuntdBAwng9ZOjwbw5o6sXrdQfhTsNK0fcMuuHYMeiy/EzW8SBZyct C+9L5Zvo5hv8spBP0vMAMU4lD7d2ojIjhzkg2on6UVKMOrUnUfWdIMSZmSeXYSxCnSsQ un0yt73CtmgA1cnmluj19I1CVOo0Gvrl7P6izs31crqIoNddq49IYfC0tbjnO0GCXoSe lhF+9MHk3RBW2UP422dpbaNuKbu4tK9KWwWqAjyboPC0MwRpFLcQBiNva0DHkrldZbTK Umow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NZXz4+mtj5flRf6qKyGbpYRNQ7VdwFmgFuQKgnqMeik=; b=JQRmfZKCCw+3GwJFN8fM9qTvT59YmGx+lI42ANouR5jeAW/7l0VcoXbwWoXHpRqk5W +8gDWRUJT1yLChjZKX4ToIJR/mBk2FFwlzqxPkBVEjKllxGBtuuYJjTfF6tUhUyx0Muv xnRJ2dw4N+99QgjK+Ul6+AnelsNLKZYpCe9E79wHsZUP67gOKPTeXtGY8Lvwp3Vqv10A WQvhOOCExsTdySBj+3YdWFtQFYCaoai/Oa2OgvBNXwzqD+LS6Iq/dQAPTP1rWxVOYgci GChwNK+q4z0VZ/UJ4wiYAnjGv6pIznSToDJRZ6jYl/xpARrcQzkMXpGgSdwEOXgz3rhq XnPw== X-Gm-Message-State: APf1xPDE7Ydd3SZ3oPBx0g1aWWxO0tl3TVSARAz26RlXCoiP0cfrqc+1 VbzGUkBg5iLMVAdVXY0XdJ+uPg== X-Google-Smtp-Source: AH8x225H4ZcvB+7/rJZhKEhroPiH8s+yOasIOgY5uBx/UuKjVNtiLEekKbPPqZXYwv74+mbSULomTQ== X-Received: by 10.80.169.53 with SMTP id l50mr7685821edc.128.1518623174953; Wed, 14 Feb 2018 07:46:14 -0800 (PST) Received: from [10.0.0.101] ([84.203.84.137]) by smtp.googlemail.com with ESMTPSA id a63sm5831273ede.89.2018.02.14.07.46.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 07:46:13 -0800 (PST) To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , "Gao, Liming" References: <20180214130857.5020-1-pete@akeo.ie> <20180214130857.5020-2-pete@akeo.ie> From: Pete Batard Message-ID: <1623adea-5540-9433-8882-d607351c3957@akeo.ie> Date: Wed, 14 Feb 2018 15:46:12 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Subject: Re: [PATCH 1/4] MdePkg: Disable some Level 4 warnings for VS2017/ARM64 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2018 15:40:25 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Hi Ard, On 2018.02.14 13:13, Ard Biesheuvel wrote: > On 14 February 2018 at 13:08, Pete Batard wrote: >> We disable the exact same warnings as IA32 and X64. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Pete Batard >> --- >> MdePkg/Include/AArch64/ProcessorBind.h | 53 +++++++++++++++++++- >> 1 file changed, 51 insertions(+), 2 deletions(-) >> >> diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h >> index bc473562f9e5..4f341ebeb03f 100644 >> --- a/MdePkg/Include/AArch64/ProcessorBind.h >> +++ b/MdePkg/Include/AArch64/ProcessorBind.h >> @@ -1,7 +1,7 @@ >> /** @file >> Processor or Compiler specific defines and types for AArch64. >> >> - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>> + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
>> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
>> Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.
>> >> @@ -30,7 +30,56 @@ >> #pragma pack() >> #endif >> >> -#if _MSC_EXTENSIONS >> +#if defined(_MSC_EXTENSIONS) >> + >> +// >> +// Disable some level 4 compilation warnings (same as IA32 and X64) >> +// >> + >> +// >> +// Disabling bitfield type checking warnings. >> +// >> +#pragma warning ( disable : 4214 ) >> + >> +// >> +// Disabling the unreferenced formal parameter warnings. >> +// >> +#pragma warning ( disable : 4100 ) >> + >> +// >> +// Disable slightly different base types warning as CHAR8 * can not be set >> +// to a constant string. >> +// >> +#pragma warning ( disable : 4057 ) >> + >> +// >> +// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning >> +// >> +#pragma warning ( disable : 4127 ) >> + >> +// >> +// This warning is caused by functions defined but not used. For precompiled header only. >> +// >> +#pragma warning ( disable : 4505 ) >> + >> +// >> +// This warning is caused by empty (after preprocessing) source file. For precompiled header only. >> +// >> +#pragma warning ( disable : 4206 ) >> + >> +// >> +// Disable 'potentially uninitialized local variable X used' warnings >> +// >> +#pragma warning ( disable : 4701 ) >> + >> +// >> +// Disable 'potentially uninitialized local pointer variable X used' warnings >> +// >> +#pragma warning ( disable : 4703 ) >> + >> +#endif >> + >> +#if defined(_MSC_EXTENSIONS) > > Can you drop the redundant #endif + #if please? Will do. I'll probably wait another week before sending a v2, since I expect some reviewers to be off for Chinese New Year. > Also, I take it > _MSC_EXTENSIONS will never be #defined to 0 ? According to Microsoft [1]: Defined as 1 if the /Ze (Enable Language Extensions) compiler option is set, which is the default. Otherwise, undefined. > > >> // >> // use Microsoft* C compiler dependent integer width types >> // >> -- >> 2.9.3.windows.2 >> Regards, /Pete [1] https://msdn.microsoft.com/en-us/library/b0084kay.aspx