volser: let it be known that Abort() really aborts
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 9 Aug 2011 01:41:57 +0000 (21:41 -0400)
committerDerrick Brashear <shadow@dementia.org>
Tue, 9 Aug 2011 16:07:08 +0000 (09:07 -0700)
The compiler and static checkers can do a better job if they know that
certain functions never return.  Tell it that common.c:Abort() is such
a function.  While we're at it, let volser_internal.h provide the
declarations for this function (Log() was already there).  This makes
volser parallel to the way the same functions are declared in vol.

Change-Id: I8b684bf96866edfc9edaae126d789d245a8d2356
Reviewed-on: http://gerrit.openafs.org/5175
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

src/volser/volmain.c
src/volser/volser_internal.h

index 800f330..7222853 100644 (file)
@@ -48,9 +48,6 @@
 #include "volint.h"
 #include "volser_internal.h"
 
-/*@printflike@*/ extern void Log(const char *format, ...);
-/*@printflike@*/ extern void Abort(const char *format, ...);
-
 #define VolserVersion "2.0"
 #define N_SECURITY_OBJECTS 3
 
index e9eb027..c94c355 100644 (file)
@@ -11,6 +11,7 @@
 #define AFS_SRC_VOLSER_INTERNAL_H
 
 /* common.c */
+extern void Abort(const char *, ...) AFS_NORETURN AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
 extern void Log(const char *, ...) AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
 extern void InitErrTabs(void);