]> granicus.if.org Git - strace/commitdiff
improve ifdef check with decode_subcall
authorMike Frysinger <vapier@gentoo.org>
Thu, 15 Mar 2012 05:09:19 +0000 (01:09 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 15 Mar 2012 20:14:28 +0000 (20:14 +0000)
Use the same ifdef logic around the call sites of decode_subcall()
to protect the definition of the func itself.  This fixes warnings
for targets like hppa which don't use this func.

* syscall.c (decode_subcall): Wrap in SYS_socket_subcall and
SYS_ipc_subcall define checks.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
syscall.c

index 546a8c41e6f51824eb3b2ed3d88139fe6e61c640..657cdbf151fd1cca60e9d4a7e3358fbb3984ddc9 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -516,7 +516,7 @@ qualify(const char *s)
 
 enum subcall_style { shift_style, deref_style, mask_style, door_style };
 
-#if !(defined(ALPHA) || defined(MIPS) || defined(__ARM_EABI__))
+#if defined(SYS_socket_subcall) || defined(SYS_ipc_subcall)
 
 static void
 decode_subcall(struct tcb *tcp, int subcall, int nsubcalls, enum subcall_style style)
@@ -580,7 +580,8 @@ decode_subcall(struct tcb *tcp, int subcall, int nsubcalls, enum subcall_style s
                break;
        }
 }
-#endif
+
+#endif /* SYS_socket_subcall || SYS_ipc_subcall */
 
 int
 printargs(struct tcb *tcp)