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

@@ -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
}