From 292b375e392c6d3443d486e654a88bc4b4502cb2 Mon Sep 17 00:00:00 2001 From: Garrett Wollman Date: Mon, 8 Aug 2011 21:41:57 -0400 Subject: [PATCH] volser: let it be known that Abort() really aborts 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 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- src/volser/volmain.c | 3 --- src/volser/volser_internal.h | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/volser/volmain.c b/src/volser/volmain.c index 800f33062..722285306 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -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 diff --git a/src/volser/volser_internal.h b/src/volser/volser_internal.h index e9eb027ee..c94c355ca 100644 --- a/src/volser/volser_internal.h +++ b/src/volser/volser_internal.h @@ -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); -- 2.39.5