Do not use a non-literal format string
authorBen Kaduk <kaduk@mit.edu>
Wed, 31 Jul 2013 00:17:01 +0000 (20:17 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Fri, 2 Aug 2013 15:55:27 +0000 (08:55 -0700)
Now that UKERNEL's panic() is a proper varargs function (gerrit 9877),
we can use a literal format string "%s" to print the panic message.
clang warngs about a non-literal format string, and in some build
environments the warning becomes fatal via -Werror.

Change-Id: I7d8c9390e3edad7efa6ae1217f938b635423d23a
Reviewed-on: http://gerrit.openafs.org/10114
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/rx/rx_kcommon.c

index 68310a3..430f29c 100644 (file)
@@ -1321,7 +1321,7 @@ osi_Panic(char *msg, ...)
 # ifdef AFS_LINUX20_ENV
     * ((char *) 0) = 0;
 # else
-    panic(msg);
+    panic("%s", msg);
 # endif
 #endif
 }