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
This commit is contained in:
lpleahy 2012-02-10 03:30:41 +00:00
parent f6e5cdd5cf
commit 826f9005c2
10 changed files with 13 additions and 42 deletions

View File

@ -556,6 +556,13 @@ getaddrinfo(const char *hostname, const char *servname,
return error; 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 * FQDN hostname, DNS lookup
*/ */
@ -566,12 +573,6 @@ explore_fqdn(const struct addrinfo *pai, const char *hostname,
struct addrinfo *result; struct addrinfo *result;
struct addrinfo *cur; struct addrinfo *cur;
int error = 0; 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); _DIAGASSERT(pai != NULL);
/* hostname may be NULL */ /* hostname may be NULL */

View File

@ -95,7 +95,6 @@ herror(
{ {
struct iovec iov[4]; struct iovec iov[4];
register struct iovec *v = iov; register struct iovec *v = iov;
int i;
if (s && *s) { if (s && *s) {
v->iov_base = (char *)s; v->iov_base = (char *)s;
@ -110,11 +109,14 @@ herror(
v++; v++;
v->iov_base = "\n"; v->iov_base = "\n";
v->iov_len = 1; v->iov_len = 1;
#ifdef _ORG_FREEBSD_ #if defined(_ORG_FREEBSD_) || defined(__GNUC__)
writev(STDERR_FILENO, iov, (v - iov) + 1); writev(STDERR_FILENO, iov, (v - iov) + 1);
#else #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 #endif
} }

View File

@ -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 <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>

View File

@ -15,10 +15,6 @@
* SOFTWARE. * 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. */ /* Import. */
#include <sys/types.h> #include <sys/types.h>

View File

@ -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 <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>

View File

@ -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. */ /* Import. */
#include <sys/types.h> #include <sys/types.h>

View File

@ -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. */ /* Import. */
#include <arpa/nameser.h> #include <arpa/nameser.h>

View File

@ -15,10 +15,6 @@
* SOFTWARE. * 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/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>

View File

@ -60,10 +60,6 @@
* <viraj_bais@ccm.fm.intel.com> * <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/types.h>
#include <sys/param.h> #include <sys/param.h>

View File

@ -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. * Copyright (c) 1996 by Internet Software Consortium.
* *