summaryrefslogtreecommitdiffstats
path: root/StdLib
diff options
context:
space:
mode:
authorlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-10 03:30:41 +0000
committerlpleahy <lpleahy@6f19259b-4bc3-4df7-8a09-765794883524>2012-02-10 03:30:41 +0000
commit826f9005c21d61845f64f779bc86c4ca15caa1e6 (patch)
tree0a3e95f5bdac23a8342ce184b1a8af97b691125f /StdLib
parentf6e5cdd5cfa100e777db38e5f7b26b7ffcf41330 (diff)
downloadedk2-826f9005c21d61845f64f779bc86c4ca15caa1e6.tar.gz
edk2-826f9005c21d61845f64f779bc86c4ca15caa1e6.tar.bz2
edk2-826f9005c21d61845f64f779bc86c4ca15caa1e6.zip
Fix some errors detected by the GCC 4.4 compiler.
Signed-off-by: lpleahy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13006 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib')
-rw-r--r--StdLib/BsdSocketLib/getaddrinfo.c13
-rw-r--r--StdLib/BsdSocketLib/herror.c10
-rw-r--r--StdLib/BsdSocketLib/ns_name.c4
-rw-r--r--StdLib/BsdSocketLib/ns_netint.c4
-rw-r--r--StdLib/BsdSocketLib/ns_parse.c4
-rw-r--r--StdLib/BsdSocketLib/ns_print.c4
-rw-r--r--StdLib/BsdSocketLib/ns_ttl.c4
-rw-r--r--StdLib/BsdSocketLib/nsap_addr.c4
-rw-r--r--StdLib/BsdSocketLib/res_mkupdate.c4
-rw-r--r--StdLib/BsdSocketLib/res_update.c4
10 files changed, 13 insertions, 42 deletions
diff --git a/StdLib/BsdSocketLib/getaddrinfo.c b/StdLib/BsdSocketLib/getaddrinfo.c
index 11489421d8..c8ed7848a4 100644
--- a/StdLib/BsdSocketLib/getaddrinfo.c
+++ b/StdLib/BsdSocketLib/getaddrinfo.c
@@ -556,6 +556,13 @@ getaddrinfo(const char *hostname, const char *servname,
return error;
}
+static const ns_dtab dtab[] = {
+ NS_FILES_CB(_files_getaddrinfo, NULL)
+ { NSSRC_DNS, _dns_getaddrinfo, NULL }, /* force -DHESIOD */
+ NS_NIS_CB(_yp_getaddrinfo, NULL)
+ NS_NULL_CB
+};
+
/*
* FQDN hostname, DNS lookup
*/
@@ -566,12 +573,6 @@ explore_fqdn(const struct addrinfo *pai, const char *hostname,
struct addrinfo *result;
struct addrinfo *cur;
int error = 0;
- static const ns_dtab dtab[] = {
- NS_FILES_CB(_files_getaddrinfo, NULL)
- { NSSRC_DNS, _dns_getaddrinfo, NULL }, /* force -DHESIOD */
- NS_NIS_CB(_yp_getaddrinfo, NULL)
- NS_NULL_CB
- };
_DIAGASSERT(pai != NULL);
/* hostname may be NULL */
diff --git a/StdLib/BsdSocketLib/herror.c b/StdLib/BsdSocketLib/herror.c
index c918f3acef..d8a5163264 100644
--- a/StdLib/BsdSocketLib/herror.c
+++ b/StdLib/BsdSocketLib/herror.c
@@ -95,7 +95,6 @@ herror(
{
struct iovec iov[4];
register struct iovec *v = iov;
- int i;
if (s && *s) {
v->iov_base = (char *)s;
@@ -110,11 +109,14 @@ herror(
v++;
v->iov_base = "\n";
v->iov_len = 1;
-#ifdef _ORG_FREEBSD_
+#if defined(_ORG_FREEBSD_) || defined(__GNUC__)
writev(STDERR_FILENO, iov, (v - iov) + 1);
#else
- for (i = 0; i < (v - iov) + 1; i++)
- fprintf( stderr, iov[i].iov_base);
+ {
+ int i;
+ for (i = 0; i < (v - iov) + 1; i++)
+ fprintf( stderr, iov[i].iov_base);
+ }
#endif
}
diff --git a/StdLib/BsdSocketLib/ns_name.c b/StdLib/BsdSocketLib/ns_name.c
index 9303b3f437..3b8706acba 100644
--- a/StdLib/BsdSocketLib/ns_name.c
+++ b/StdLib/BsdSocketLib/ns_name.c
@@ -55,10 +55,6 @@
*
*/
-#ifndef lint
-static char rcsid[] = "$Id: ns_name.c,v 1.1.1.1 2003/11/19 01:51:32 kyu3 Exp $";
-#endif
-
#include <sys/types.h>
#include <netinet/in.h>
diff --git a/StdLib/BsdSocketLib/ns_netint.c b/StdLib/BsdSocketLib/ns_netint.c
index 6a3b290ead..977fb30147 100644
--- a/StdLib/BsdSocketLib/ns_netint.c
+++ b/StdLib/BsdSocketLib/ns_netint.c
@@ -15,10 +15,6 @@
* SOFTWARE.
*/
-#ifndef lint
-static char rcsid[] = "$Id: ns_netint.c,v 1.1.1.1 2003/11/19 01:51:33 kyu3 Exp $";
-#endif
-
/* Import. */
#include <sys/types.h>
diff --git a/StdLib/BsdSocketLib/ns_parse.c b/StdLib/BsdSocketLib/ns_parse.c
index b050cdee1f..6909d4ef5c 100644
--- a/StdLib/BsdSocketLib/ns_parse.c
+++ b/StdLib/BsdSocketLib/ns_parse.c
@@ -55,10 +55,6 @@
*
*/
-#ifndef lint
-static char rcsid[] = "$Id: ns_parse.c,v 1.1.1.1 2003/11/19 01:51:33 kyu3 Exp $";
-#endif
-
#include <sys/types.h>
#include <netinet/in.h>
diff --git a/StdLib/BsdSocketLib/ns_print.c b/StdLib/BsdSocketLib/ns_print.c
index 83aeeb32a0..ff7047a1fd 100644
--- a/StdLib/BsdSocketLib/ns_print.c
+++ b/StdLib/BsdSocketLib/ns_print.c
@@ -55,10 +55,6 @@
*
*/
-#ifndef lint
-static char rcsid[] = "$Id: ns_print.c,v 1.1.1.1 2003/11/19 01:51:34 kyu3 Exp $";
-#endif
-
/* Import. */
#include <sys/types.h>
diff --git a/StdLib/BsdSocketLib/ns_ttl.c b/StdLib/BsdSocketLib/ns_ttl.c
index a5a57449eb..aba847994b 100644
--- a/StdLib/BsdSocketLib/ns_ttl.c
+++ b/StdLib/BsdSocketLib/ns_ttl.c
@@ -55,10 +55,6 @@
*
*/
-#ifndef lint
-static char rcsid[] = "$Id: ns_ttl.c,v 1.1.1.1 2003/11/19 01:51:34 kyu3 Exp $";
-#endif
-
/* Import. */
#include <arpa/nameser.h>
diff --git a/StdLib/BsdSocketLib/nsap_addr.c b/StdLib/BsdSocketLib/nsap_addr.c
index 957c97f55f..6c904b7c9e 100644
--- a/StdLib/BsdSocketLib/nsap_addr.c
+++ b/StdLib/BsdSocketLib/nsap_addr.c
@@ -15,10 +15,6 @@
* SOFTWARE.
*/
-#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$Id: nsap_addr.c,v 1.1.1.1 2003/11/19 01:51:31 kyu3 Exp $";
-#endif /* LIBC_SCCS and not lint */
-
#include <sys/types.h>
#include <sys/param.h>
#include <sys/socket.h>
diff --git a/StdLib/BsdSocketLib/res_mkupdate.c b/StdLib/BsdSocketLib/res_mkupdate.c
index b27c2e460b..3201f312e6 100644
--- a/StdLib/BsdSocketLib/res_mkupdate.c
+++ b/StdLib/BsdSocketLib/res_mkupdate.c
@@ -60,10 +60,6 @@
* <viraj_bais@ccm.fm.intel.com>
*/
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: res_mkupdate.c,v 1.1.1.1 2003/11/19 01:51:38 kyu3 Exp $";
-#endif /* not lint */
-
#include <sys/types.h>
#include <sys/param.h>
diff --git a/StdLib/BsdSocketLib/res_update.c b/StdLib/BsdSocketLib/res_update.c
index 1ad8a8719e..a01d83203c 100644
--- a/StdLib/BsdSocketLib/res_update.c
+++ b/StdLib/BsdSocketLib/res_update.c
@@ -1,7 +1,3 @@
-#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: res_update.c,v 1.1.1.1 2003/11/19 01:51:39 kyu3 Exp $";
-#endif /* not lint */
-
/*
* Copyright (c) 1996 by Internet Software Consortium.
*