aboutsummaryrefslogtreecommitdiff
path: root/sim/common/syscall.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>1997-11-26 19:19:58 +0000
committerDoug Evans <dje@google.com>1997-11-26 19:19:58 +0000
commitfc63d75ab3d3989b84af3817f8169adc2dfe36b2 (patch)
treed236ccd90dde8bc6f36f015471fd0e3b1408042d /sim/common/syscall.c
parent803fea795a13b72d2836e75b1983c13f86296ea8 (diff)
downloadgdb-fc63d75ab3d3989b84af3817f8169adc2dfe36b2.zip
gdb-fc63d75ab3d3989b84af3817f8169adc2dfe36b2.tar.gz
gdb-fc63d75ab3d3989b84af3817f8169adc2dfe36b2.tar.bz2
* syscall.c (cb_syscall, cases stat, fstat): Handle -Wall -Werror.
Diffstat (limited to 'sim/common/syscall.c')
-rw-r--r--sim/common/syscall.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 4f0c96c..fbeb24c 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -390,7 +390,10 @@ cb_syscall (cb, sc)
result = -1;
goto FinishSyscall;
}
- if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != buflen)
+ /* ??? Coercion to unsigned avoids -Wall -Werror failure.
+ Ya, cb_host_to_target_stat could return an unsigned int,
+ but that seems worse. */
+ if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != (unsigned) buflen)
{
free (buf);
errcode = EINVAL;
@@ -422,7 +425,10 @@ cb_syscall (cb, sc)
result = -1;
goto FinishSyscall;
}
- if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != buflen)
+ /* ??? Coercion to unsigned avoids -Wall -Werror failure.
+ Ya, cb_host_to_target_stat could return an unsigned int,
+ but that seems worse. */
+ if ((*sc->write_mem) (cb, sc, addr, buf, buflen) != (unsigned) buflen)
{
free (buf);
errcode = EINVAL;