diff options
author | Doug Evans <dje@google.com> | 1997-11-26 19:19:58 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1997-11-26 19:19:58 +0000 |
commit | fc63d75ab3d3989b84af3817f8169adc2dfe36b2 (patch) | |
tree | d236ccd90dde8bc6f36f015471fd0e3b1408042d /sim/common/syscall.c | |
parent | 803fea795a13b72d2836e75b1983c13f86296ea8 (diff) | |
download | gdb-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.c | 10 |
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; |