From fc63d75ab3d3989b84af3817f8169adc2dfe36b2 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Wed, 26 Nov 1997 19:19:58 +0000 Subject: * syscall.c (cb_syscall, cases stat, fstat): Handle -Wall -Werror. --- sim/common/syscall.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sim/common/syscall.c') 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; -- cgit v1.1