From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 2BA197803CC for ; Wed, 14 Feb 2024 15:03:29 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LGXl7zK59qxlYgiXjexNCCRFCoRcvTWYLu7B64AIjbQ=; c=relaxed/simple; d=groups.io; h=Feedback-ID:Message-ID:Date:MIME-Version:User-Agent:Subject:To:Cc:References:From:In-Reply-To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1707923007; v=1; b=KgFJ+j6CDPTjAFGNNfMgZo+MIC9NwyU374ehzgeeTWPBEGg8Sy495AzsMzD58nP9L65MVK6M odkYLM7HdCkqbq73Uj2fx2xLpTtVL96D0jdOQAE9+2siAuGp3WetAkCpXkGPZyF9wHsXfvLkm65 XSsl4AahIgqsT7EvfZpcW1YI= X-Received: by 127.0.0.2 with SMTP id dEuBYY7687511x5ivBx83wXq; Wed, 14 Feb 2024 07:03:27 -0800 X-Received: from fout3-smtp.messagingengine.com (fout3-smtp.messagingengine.com [103.168.172.146]) by mx.groups.io with SMTP id smtpd.web11.43518.1707923007201821758 for ; Wed, 14 Feb 2024 07:03:27 -0800 X-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 7B7891380090; Wed, 14 Feb 2024 10:03:26 -0500 (EST) X-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 14 Feb 2024 10:03:26 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudejgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnheplefhgeevleehieeuveduudfguedtieetteevhffgfffhhffhveffueegtdeg keeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 14 Feb 2024 10:03:24 -0500 (EST) Message-ID: Date: Wed, 14 Feb 2024 08:03:24 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C To: "Jayaprakash, N" , "devel@edk2.groups.io" , Pedro Falcato Cc: "Kinney, Michael D" , Laszlo Ersek , Liming Gao , "Feng, Bob C" , "Chen, Christine" References: <20240206070234.31-1-n.jayaprakash@intel.com> <20240206070234.31-2-n.jayaprakash@intel.com> <17B176ECA49BD037.2925@groups.io> <17B22B806B304043.15017@groups.io> From: "Rebecca Cran" In-Reply-To: Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@bsdio.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 5POmDTYiXXFILUhOs7SN0u81x7686176AA= Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=KgFJ+j6C; dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: Rebecca Cran On 2/13/24 09:24, Jayaprakash, N wrote: > Could one of the maintainers of this package review this patch? > > Regards, > JP > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Jayaprakash, N > Sent: Friday, February 9, 2024 4:07 PM > To: devel@edk2.groups.io; Jayaprakash, N ; Pedro Falcato > Cc: Rebecca Cran ; Kinney, Michael D ; Laszlo Ersek ; Liming Gao ; Feng, Bob C ; Chen, Christine > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > Hi Pedro, > > Do you agree with the below thoughts? Let me know if you have any questions. > > Regards, > JP > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Jayaprakash, N > Sent: Wednesday, February 7, 2024 8:58 AM > To: Pedro Falcato ; devel@edk2.groups.io > Cc: Rebecca Cran ; Kinney, Michael D ; Laszlo Ersek ; Liming Gao ; Feng, Bob C ; Chen, Christine > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > Thanks Pedro. > > I thought about using / instead of \\ but in many places, the path separator \\ is still used across the code. > But after looking at the usage of path separator in other parts of the code. I decided to go with \\. > > For example: > In the same file: > 2953 : MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath) > > 2842: if sys.platform == "win32": > MakeApp = MakeApp + 'APPFILE = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + 'INC = ' > > Hence to align with the usage of path separator for "win32", I have used the \\ instead of /. > > Hope this is fine. > > Regards, > JP > > -----Original Message----- > From: Pedro Falcato > Sent: Tuesday, February 6, 2024 10:14 PM > To: devel@edk2.groups.io; Jayaprakash, N > Cc: Rebecca Cran ; Kinney, Michael D ; Laszlo Ersek ; Liming Gao ; Feng, Bob C ; Chen, Christine > Subject: Re: [edk2-devel] [edk2 Patch 1/1] BaseTools: Syntax warning invalid escape sequence \C > > On Tue, Feb 6, 2024 at 7:02 AM Jayaprakash, N wrote: >> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4666 >> >> This commit fixes the issue reported through BZ4666. >> The Syntax warning related to invalid escape sequence for \C is seen >> on Windows OS based builds of edk2 sources. >> On Windows the path seperator needs to prefixed with \ so essentially >> we need to use \\ as path seperator. >> >> Cc: Rebecca Cran >> Cc: Michael D Kinney >> Cc: Laszlo Ersek >> Cc: Liming Gao >> Cc: Bob Feng >> Cc: Yuwei Chen >> Cc: Jayaprakash N >> Signed-off-by: Jayaprakash N >> --- >> BaseTools/Source/Python/Workspace/DscBuildData.py | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py >> b/BaseTools/Source/Python/Workspace/DscBuildData.py >> index 4768099343..b69d406249 100644 >> --- a/BaseTools/Source/Python/Workspace/DscBuildData.py >> +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py >> @@ -2949,7 +2949,7 @@ class DscBuildData(PlatformBuildClassObject): >> for include_file in IncFileList: >> MakeApp += "$(OBJECTS) : %s\n" % include_file >> if sys.platform == "win32": >> - PcdValueCommonPath = os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"], "Source\C\Common\PcdValueCommon.c")) >> + PcdValueCommonPath = >> + os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH" >> + ], "Source\\C\\Common\\PcdValueCommon.c")) > AIUI, changing the \ to / would also work (and it would be prettier/more readable), since we're calling normpath right after. > > -- > Pedro > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#115460): https://edk2.groups.io/g/devel/message/115460 Mute This Topic: https://groups.io/mt/104193926/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-