From: Wichert Akkerman Date: Sun, 31 Mar 2002 19:00:02 +0000 (+0000) Subject: Fix signed/unsigned problems X-Git-Tag: v4.5.18~996 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ab47b63e3d58dfbe32ba909b222c1bc2a88c5c0;p=strace Fix signed/unsigned problems --- diff --git a/ChangeLog b/ChangeLog index 894ad419..d2457bef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2002-03-31 Wichert Akkerman * debian/*: added + * linux/syscallent.h: fix typo and add the reserved stream syscalls + * defs.h, file.c, io.c: fix signed/unsigned issues 2001-12-17 Wichert Akkerman diff --git a/defs.h b/defs.h index 236668f6..3a2142df 100644 --- a/defs.h +++ b/defs.h @@ -534,10 +534,10 @@ do { \ #if HAVE_LITTLE_ENDIAN_LONG_LONG #define LONG_LONG(_l,_h) \ - ((long long)((unsigned long long)(_l) | ((unsigned long long)(_h)<<32))) + ((long long)((unsigned long long)(unsigned)(_l) | ((unsigned long long)(_h)<<32))) #else #define LONG_LONG(_l,_h) \ - ((long long)((unsigned long long)(_h) | ((unsigned long long)(_l)<<32))) + ((long long)((unsigned long long)(unsigned)(_h) | ((unsigned long long)(_l)<<32))) #endif #endif diff --git a/file.c b/file.c index f72ad489..bfb12ca3 100644 --- a/file.c +++ b/file.c @@ -404,11 +404,11 @@ struct tcb *tcp; if (tcp->u_arg[4] == SEEK_SET) tprintf("%ld, %llu, ", tcp->u_arg[0], (((long long int) tcp->u_arg[1]) << 32 - | (unsigned long long) tcp->u_arg[2])); + | (unsigned long long) (unsigned) tcp->u_arg[2])); else tprintf("%ld, %lld, ", tcp->u_arg[0], (((long long int) tcp->u_arg[1]) << 32 - | (unsigned long long) tcp->u_arg[2])); + | (unsigned long long) (unsigned) tcp->u_arg[2])); } else { long long int off; diff --git a/io.c b/io.c index 823f9c37..3f1022c6 100644 --- a/io.c +++ b/io.c @@ -162,7 +162,7 @@ struct tcb *tcp; #else tprintf(", %lu, %llu", tcp->u_arg[2], (((unsigned long long) tcp->u_arg[4]) << 32 - | tcp->u_arg[3])); + | (unsigned) tcp->u_arg[3])); #endif } return 0; @@ -181,7 +181,7 @@ struct tcb *tcp; #else tprintf(", %lu, %llu", tcp->u_arg[2], (((unsigned long long) tcp->u_arg[4]) << 32 - | tcp->u_arg[3])); + | (unsigned) tcp->u_arg[3])); #endif } return 0; @@ -199,7 +199,7 @@ struct tcb *tcp; if (entering(tcp)) { tprintf("%ld, %ld, %llu, %lu", tcp->u_arg[0], tcp->u_arg[1], (((unsigned long long) tcp->u_arg[3]) << 32 | - tcp->u_arg[2]), tcp->u_arg[4]); + (unsigned) tcp->u_arg[2]), tcp->u_arg[4]); } else { off_t offset;