From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.20; helo=mga02.intel.com; envelope-from=jaben.carsey@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 3328E21B00DC9 for ; Mon, 13 Nov 2017 07:36:17 -0800 (PST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2017 07:40:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,389,1505804400"; d="scan'208";a="175249396" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 13 Nov 2017 07:40:22 -0800 Received: from FMSMSX110.amr.corp.intel.com (10.18.116.10) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 13 Nov 2017 07:40:22 -0800 Received: from fmsmsx103.amr.corp.intel.com ([169.254.2.117]) by FMSMSX110.amr.corp.intel.com ([169.254.14.55]) with mapi id 14.03.0319.002; Mon, 13 Nov 2017 07:40:22 -0800 From: "Carsey, Jaben" To: Laszlo Ersek , Thiebaud Weksteen , "edk2-devel@lists.01.org" , Daryl McDaniel CC: "Bjorge, Erik C" Thread-Topic: [edk2] [PATCH] StdLib/BsdSocketLib: Remove unused variables Thread-Index: AQHTTkESZLYkWBfr6UGlLKV0olgEMqMS7+cA//+e9VA= Date: Mon, 13 Nov 2017 15:40:22 +0000 Message-ID: References: <2c8db66b18b93d008b1bb8028c23f51ce2b76b29.1509011535.git.tweek@google.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiM2U4YzE2MTUtNGRlMy00Yjk0LWIzY2MtZmZjZjA0MjkzMGZlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjRpSERBTE1WTFNCUGh2ZVcwWkhiU3dXYUFBa09qa3RZbnNSUzd6XC9LdFBRPSJ9 x-ctpclassification: CTP_IC x-originating-ip: [10.1.200.108] MIME-Version: 1.0 Subject: Re: [PATCH] StdLib/BsdSocketLib: Remove unused variables 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: Mon, 13 Nov 2017 15:36:18 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jaben Carsey And pushed. > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Laszlo Ersek > Sent: Monday, November 13, 2017 5:27 AM > To: Thiebaud Weksteen ; edk2-devel@lists.01.org; > Daryl McDaniel ; Carsey, Jaben > > Cc: Bjorge, Erik C > Subject: Re: [edk2] [PATCH] StdLib/BsdSocketLib: Remove unused variables > Importance: High >=20 > Jaben, Daryl, >=20 > can you please review this patch? >=20 > Thiebaud: best CC the package maintainers from Maintainers.txt on patches= . >=20 > Thanks! > Laszlo >=20 > On 10/26/17 11:58, Thiebaud Weksteen wrote: > > TianoCore BZ#677 > > > > Remove unused variables and turn nsdispatch macro into a function. This > > is not what is recommended in the bug ticket but avoid heavier > > modification of the code (and deviation from upsteam). > > > > Contributed-under: TianoCore Contribution Agreement 1.1 > > Signed-off-by: Thiebaud Weksteen > > --- > > StdLib/BsdSocketLib/getaddrinfo.c | 10 ++++++---- > > StdLib/BsdSocketLib/gethostbydns.c | 2 ++ > > 2 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/StdLib/BsdSocketLib/getaddrinfo.c > b/StdLib/BsdSocketLib/getaddrinfo.c > > index 5a0baf6d45..9d1acdb3fb 100644 > > --- a/StdLib/BsdSocketLib/getaddrinfo.c > > +++ b/StdLib/BsdSocketLib/getaddrinfo.c > > @@ -92,7 +92,6 @@ __RCSID("$NetBSD: getaddrinfo.c,v 1.91.6.1 > 2009/01/26 00:27:34 snj Exp $"); > > #include > > > > #define endservent_r(svd) endservent() > > -#define nsdispatch(pResult,dtab,database,routine,files,hostname,pai) > NS_NOTFOUND > > #define > res_nmkquery(state,op,dname,class,type,data,datalen,newrr_in,buf,buflen > ) res_mkquery( op, dname, class, type, data, datalen, newrr_in, buf, buf= len ) > > #define res_nsend(state,buf,buflen,ans,anssiz) res_send ( buf, bufl= en, > ans, anssiz ) > > > > @@ -306,6 +305,12 @@ do { > \ > > #define MATCH(x, y, w) > \ > > ((x) =3D=3D (y) || (/*CONSTCOND*/(w) && ((x) =3D=3D ANY || (y) =3D=3D= ANY))) > > > > +int nsdispatch(void *result, const ns_dtab dist_tab[], const char* > database, > > + const char *method, const ns_src defaults[], ...) > > +{ > > + return NS_NOTFOUND; > > +} > > + > > const char * > > gai_strerror(int ecode) > > { > > @@ -1062,9 +1067,6 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 > *sin6, u_int32_t *scopeid) > > > > /* code duplicate with gethnamaddr.c */ > > > > -static const char AskedForGot[] =3D > > - "gethostby*.getanswer: asked for \"%s\", got \"%s\""; > > - > > static struct addrinfo * > > getanswer(const querybuf *answer, int anslen, const char *qname, int > qtype, > > const struct addrinfo *pai) > > diff --git a/StdLib/BsdSocketLib/gethostbydns.c > b/StdLib/BsdSocketLib/gethostbydns.c > > index 25e7c3b142..17c43ba59c 100644 > > --- a/StdLib/BsdSocketLib/gethostbydns.c > > +++ b/StdLib/BsdSocketLib/gethostbydns.c > > @@ -129,8 +129,10 @@ u_int16_t _getshort(const u_char *src); > > #define MAXALIASES 35 > > #define MAXADDRS 35 > > > > +#ifdef _ORG_FREEBSD_ > > static const char AskedForGot[] =3D > > "gethostby*.gethostanswer: asked for \"%s\", got \"%s\""; > > +#endif > > > > static char *h_addr_ptrs[MAXADDRS + 1]; > > > > >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel