]> granicus.if.org Git - strace/commitdiff
Fix signed/unsigned problems
authorWichert Akkerman <wichert@deephackmode.org>
Sun, 31 Mar 2002 19:00:02 +0000 (19:00 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Sun, 31 Mar 2002 19:00:02 +0000 (19:00 +0000)
ChangeLog
defs.h
file.c
io.c

index 894ad41925ed0f534ab3e4537eebf08f250f0321..d2457bef0546ddeedac40dbe5d9b9fdc0286fd54 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2002-03-31  Wichert Akkerman <wichert@deephackmode.org>
 
        * 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 <wakkerma@debian.org>
 
diff --git a/defs.h b/defs.h
index 236668f6ad2865b1f2ba7d7e6aad1e7239710bd3..3a2142dfc19f19717f4645252bbfac61dc7b90bf 100644 (file)
--- 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 f72ad4893f4da6d18e328ac6d1116f6aa148002a..bfb12ca30a3cfdb528690e8909f6d70e408ba275 100644 (file)
--- 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 823f9c3705c349f6e404e7f913d75827355c730e..3f1022c6031c0b3dffa368aa6e211b376f78e073 100644 (file)
--- 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;