From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 AF80021164C5F for ; Tue, 9 Oct 2018 17:58:59 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Oct 2018 17:58:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,362,1534834800"; d="scan'208";a="97616395" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga001.fm.intel.com with ESMTP; 09 Oct 2018 17:55:56 -0700 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Oct 2018 17:55:55 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 9 Oct 2018 17:55:55 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.48]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Wed, 10 Oct 2018 08:55:53 +0800 From: "Gao, Liming" To: "Guo, Dongao" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg/RegularExpressionDxe:omit unused variable Thread-Index: AQHUXtyH+3mqU2RfKkqPH0/vIRmQr6UXqjEg Date: Wed, 10 Oct 2018 00:55:52 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E3361F2@SHSMSX104.ccr.corp.intel.com> References: <1538985408-16028-1-git-send-email-dongao.guo@intel.com> In-Reply-To: <1538985408-16028-1-git-send-email-dongao.guo@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/RegularExpressionDxe:omit unused variable X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Oct 2018 00:58:59 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Guo, Dongao >Sent: Monday, October 08, 2018 3:57 PM >To: edk2-devel@lists.01.org >Cc: Gao, Liming >Subject: [PATCH] MdeModulePkg/RegularExpressionDxe:omit unused >variable > > >comment unused variable to avoid warning,and modify inf build option. > >Cc: Liming Gao >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Dongao Guo >--- > .../RegularExpressionDxe/Oniguruma/regexec.c | 28 +++++++++++------= -- >--- > .../RegularExpressionDxe/RegularExpressionDxe.inf | 3 --- > 2 files changed, 14 insertions(+), 17 deletions(-) > >diff --git >a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c >b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c >index 7b0fda0..26e7a31 100644 >--- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c >+++ >b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regexec.c >@@ -5603,11 +5603,11 @@ onig_builtin_monitor(OnigCalloutArgs* args, >void* user_data) > int r; > int num; > size_t tag_len; >- const UChar* start; >- const UChar* right; >- const UChar* current; >- const UChar* string; >- const UChar* strend; >+ // const UChar* start; >+ // const UChar* right; >+ // const UChar* current; >+ // const UChar* string; >+ // const UChar* strend; > const UChar* tag_start; > const UChar* tag_end; > regex_t* reg; >@@ -5615,9 +5615,9 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* >user_data) > OnigType type; > OnigValue val; > char buf[20]; >- FILE* fp; >+ // FILE* fp; > >- fp =3D OutFp; >+ // fp =3D OutFp; > > r =3D onig_get_arg_by_callout_args(args, 0, &type, &val); > if (r !=3D ONIG_NORMAL) return r; >@@ -5633,11 +5633,11 @@ onig_builtin_monitor(OnigCalloutArgs* args, >void* user_data) > } > > num =3D onig_get_callout_num_by_callout_args(args); >- start =3D onig_get_start_by_callout_args(args); >- right =3D onig_get_right_range_by_callout_args(args); >- current =3D onig_get_current_by_callout_args(args); >- string =3D onig_get_string_by_callout_args(args); >- strend =3D onig_get_string_end_by_callout_args(args); >+ // start =3D onig_get_start_by_callout_args(args); >+ // right =3D onig_get_right_range_by_callout_args(args); >+ // current =3D onig_get_current_by_callout_args(args); >+ // string =3D onig_get_string_by_callout_args(args); >+ // strend =3D onig_get_string_end_by_callout_args(args); > reg =3D onig_get_regex_by_callout_args(args); > tag_start =3D onig_get_callout_tag_start(reg, num); > tag_end =3D onig_get_callout_tag_end(reg, num); >@@ -5653,7 +5653,7 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* >user_data) > for (i =3D 0; i < tag_len; i++) buf[i] =3D tag_start[i]; > buf[tag_len] =3D '\0'; > } >- >+/* > fprintf(fp, "ONIG-MONITOR: %-4s %s at: %d [%d - %d] len: %d\n", > buf, > in =3D=3D ONIG_CALLOUT_IN_PROGRESS ? "=3D>" : "<=3D", >@@ -5662,7 +5662,7 @@ onig_builtin_monitor(OnigCalloutArgs* args, void* >user_data) > (int )(right - string), > (int )(strend - string)); > //fflush(fp); >- >+*/ > return ONIG_CALLOUT_SUCCESS; > } > >diff --git >a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.in >f >b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.in >f >index 16e91bd..98fb8db 100644 >--- >a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.in >f >+++ >b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.in >f >@@ -106,6 +106,3 @@ > > # Oniguruma: signed and unsigned mismatch/cast > MSFT:*_*_*_CC_FLAGS =3D /wd4018 /wd4245 /wd4389 >- >- # Oniguruma: error: variable 'fp' set but not used >- GCC:*_*_*_CC_FLAGS =3D -Wno-error=3Dunused-but-set-variable >-- >1.9.1