From nobody Fri May 3 11:36:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1509011927334111.09039832122403; Thu, 26 Oct 2017 02:58:47 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 4F5282034CF93; Thu, 26 Oct 2017 02:54:59 -0700 (PDT) Received: from mail-oi0-x24a.google.com (mail-oi0-x24a.google.com [IPv6:2607:f8b0:4003:c06::24a]) (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 D6FDF20347171 for ; Thu, 26 Oct 2017 02:54:57 -0700 (PDT) Received: by mail-oi0-x24a.google.com with SMTP id h6so2858994oia.17 for ; Thu, 26 Oct 2017 02:58:43 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4003:c06::24a; helo=mail-oi0-x24a.google.com; envelope-from=30rhxwqukctegj1173bb381.zb9107p-01i1885fgf.no.be3@flex--tweek.bounces.google.com; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:date:message-id:subject:from:to:cc; bh=+yR3l5OrD7fIM3oIvxIW9hkliNeHat226okvZUm6zM4=; b=Wp+OEd4wkRyVLkEIOGitZwSqe/k6Mb5RAZxxJjV0UWvSnJmoLtU7Fu79j40VttS/AH 03diED4nNLBNJagZl49c7iaoYooPyvHOgwmhhQIACKpKwvcqj6f5rn8ntlgTJNwUyjLf D5Na6S5EFtcDXJTWmd6EPm5HhuvPCtdY0aecdlUcDHcI7BDWtJO58ZMeevKT9ZJvvS84 8IiFgl8UUaQpcHIvWivSAhG1CNySt+9+N/Dui05BYZjEzUIvUay/YGcXDMLOso+Th+G4 H2wxGnzWxvjEV1xcuts5N/CeU/Om/oBNZhiFmYqCHS1bmbfVtvOAnWnLVyclc5oUSDAu yeYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to:cc; bh=+yR3l5OrD7fIM3oIvxIW9hkliNeHat226okvZUm6zM4=; b=dYnEDUyV7muYK3UE9Eo6hXbCmjlSezqB7K5RCQrNUs7weqkb15LCgoL7mSy1FtUayR wxx62eKLHx6BOAfJd1PAN6KspPEnFtq++1v7VvcIaFCV1F7F3OdV0fhC1aoVEj5SQIxS IitS7kc0Ob2HJc9aPbxQ9YHicfrKvKLFQXcuwCxbjM14UK4mW1iv9jwfCuWrwmU//Kcq B8jOJJmzOQTVOfOaHWjYwQVD/xbx7l3ANw+yHL2hMyWSQq3ThLICtW6LyWZ/v7QecO2V J3DtEU1UjZjELxSvKix5zmGLeoNET5rdB4okw+MCTUic7wE0UR+URVNTaRu25PPk+BaI /uLQ== X-Gm-Message-State: AMCzsaV1bO13zOQSwHjoyWNca816VzG0kbrrS3CxfI/atvO5kKiuq2GV X8d4J/f5UmnoX+dfHzA+WI5PC3iahWDiq+1JlVyzo1FgXK7uueDb4VXAT92NxJ2l2kI4mneihXQ VuQHCT9UdxnK7P3UX2TH3CuP9NFDTHcMhDkLU7+RiqLPDIX0Nebccy5zqep73 X-Google-Smtp-Source: ABhQp+S6sqv6e7wSH7PZWKEMdFIA2aFvnSoCx+HtRMzq/iV3opmmteJHgSY9Qo1+musrjR1G+9x0LLswRQ== MIME-Version: 1.0 X-Received: by 10.157.26.100 with SMTP id u33mr2617960otu.113.1509011922717; Thu, 26 Oct 2017 02:58:42 -0700 (PDT) Date: Thu, 26 Oct 2017 11:58:15 +0200 Message-Id: <2c8db66b18b93d008b1bb8028c23f51ce2b76b29.1509011535.git.tweek@google.com> X-Mailer: git-send-email 2.15.0.rc2.357.g7e34df9404-goog From: Thiebaud Weksteen To: edk2-devel@lists.01.org Subject: [edk2] [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: , Cc: erik.c.bjorge@intel.com Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Jaben Carsey --- 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/getadd= rinfo.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 =20 #define endservent_r(svd) endservent() -#define nsdispatch(pResult,dtab,database,routine,files,hostname,pai) NS_N= OTFOUND #define res_nmkquery(state,op,dname,class,type,data,datalen,newrr_in,buf,b= uflen) res_mkquery( op, dname, class, type, data, datalen, newrr_in, buf, = buflen ) #define res_nsend(state,buf,buflen,ans,anssiz) res_send ( buf, buflen, = ans, anssiz ) =20 @@ -306,6 +305,12 @@ do { \ #define MATCH(x, y, w) \ ((x) =3D=3D (y) || (/*CONSTCOND*/(w) && ((x) =3D=3D ANY || (y) =3D=3D ANY= ))) =20 +int nsdispatch(void *result, const ns_dtab dist_tab[], const char* databas= e, + 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 *sin= 6, u_int32_t *scopeid) =20 /* code duplicate with gethnamaddr.c */ =20 -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/getho= stbydns.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 =20 +#ifdef _ORG_FREEBSD_ static const char AskedForGot[] =3D "gethostby*.gethostanswer: asked for \"%s\", got \"%s\""; +#endif =20 static char *h_addr_ptrs[MAXADDRS + 1]; =20 --=20 2.15.0.rc2.357.g7e34df9404-goog _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel