fstrace: only declare 'rval' when it is used
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 6 Feb 2014 22:27:28 +0000 (17:27 -0500)
committerJeffrey Altman <jaltman@your-file-system.com>
Sat, 8 Feb 2014 22:21:25 +0000 (14:21 -0800)
... to avoid compiler warnings about unused variables.

Found by clang on FreeBSD 10.0.

Change-Id: I30c9fbc0e2fb0f9af273f0f17861009b6d0577df
Reviewed-on: http://gerrit.openafs.org/10822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/venus/fstrace.c

index 588415e..4b8207f 100644 (file)
@@ -1098,7 +1098,10 @@ int
 afs_syscall(long call, long parm0, long parm1, long parm2, long parm3,
            long parm4, long parm5, long parm6)
 {
-    int code, rval;
+    int code;
+#if defined(AFS_DARWIN80_ENV) || defined(AFS_LINUX20_ENV)
+    int rval;
+#endif
 #ifdef AFS_LINUX20_ENV
 #if defined AFS_LINUX_64BIT_KERNEL
     long long eparm[4];