GCC6 introduced 'unused-const-variable' which causes a few new warnings.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Zimmermann <[email protected]>

---
 StdLib/BsdSocketLib/getaddrinfo.c  | 2 ++
 StdLib/BsdSocketLib/gethostbydns.c | 2 ++
 StdLib/LibC/Main/Arm/flt_rounds.c  | 2 ++
 StdLib/LibC/Math/w_exp.c           | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/StdLib/BsdSocketLib/getaddrinfo.c
b/StdLib/BsdSocketLib/getaddrinfo.c
index 5a0baf6..8a5bf17 100644
--- a/StdLib/BsdSocketLib/getaddrinfo.c
+++ b/StdLib/BsdSocketLib/getaddrinfo.c
@@ -1062,8 +1062,10 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6
*sin6, u_int32_t *scopeid)

 /* code duplicate with gethnamaddr.c */

+#ifdef _ORG_FREEBSD_
 static const char AskedForGot[] =
  "gethostby*.getanswer: asked for \"%s\", got \"%s\"";
+#endif

 static struct addrinfo *
 getanswer(const querybuf *answer, int anslen, const char *qname, int qtype,
diff --git a/StdLib/BsdSocketLib/gethostbydns.c
b/StdLib/BsdSocketLib/gethostbydns.c
index 25e7c3b..17c43ba 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[] =
  "gethostby*.gethostanswer: asked for \"%s\", got \"%s\"";
+#endif

 static char *h_addr_ptrs[MAXADDRS + 1];

diff --git a/StdLib/LibC/Main/Arm/flt_rounds.c
b/StdLib/LibC/Main/Arm/flt_rounds.c
index 7e052cc..ef8f068 100644
--- a/StdLib/LibC/Main/Arm/flt_rounds.c
+++ b/StdLib/LibC/Main/Arm/flt_rounds.c
@@ -39,12 +39,14 @@ __RCSID("$NetBSD: flt_rounds.c,v 1.3 2006/02/25
00:58:35 wiz Exp $");
 #include <sys/types.h>
 //#include <ieeefp.h>

+#if 0
 static const int map[] = {
   1,  /* round to nearest */
   2,  /* round to positive infinity */
   3,  /* round to negative infinity */
   0   /* round to zero */
 };
+#endif

 /*
  * Return the current FP rounding mode
diff --git a/StdLib/LibC/Math/w_exp.c b/StdLib/LibC/Math/w_exp.c
index 29a2bb2..f2a0e39 100644
--- a/StdLib/LibC/Math/w_exp.c
+++ b/StdLib/LibC/Math/w_exp.c
@@ -22,9 +22,11 @@ __RCSID("$NetBSD: w_exp.c,v 1.9 2002/05/26 22:02:00 wiz
Exp $");
 #include "math.h"
 #include "math_private.h"

+#ifndef _IEEE_LIBM
 static const double
 o_threshold=  7.09782712893383973096e+02,  /* 0x40862E42, 0xFEFA39EF */
 u_threshold= -7.45133219101941108420e+02;  /* 0xc0874910, 0xD52D3051 */
+#endif

 double
 exp(double x)   /* wrapper exp */
-- 
2.8.3
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to