]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
dir/vol: Die() really does
authorGarrett Wollman <wollman@csail.mit.edu>
Tue, 9 Aug 2011 03:19:22 +0000 (23:19 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 10 Aug 2011 03:52:56 +0000 (20:52 -0700)
Die() is an abort routine shared by the dir and vol modules.  Move its
prototype into dir.h to ensure that its declaration matches its three
different definitions, and add an AFS_NORETURN annotation so that the
static analyzer knows that it aborts.

Change-Id: If01f35fe796708f6187b9767497a32458888ec1c
Reviewed-on: http://gerrit.openafs.org/5177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/dir/buffer.c
src/dir/dir.h
src/dir/salvage.c
src/viced/viced.c
src/vol/physio.c
src/volser/physio.c

index e9033452918170e7bb7970e5bd6df3e7446dbbd2..2197b27667daa95f4ab5dacbbce0b065ddc127e5 100644 (file)
@@ -93,8 +93,6 @@ extern void FidZap(dir_file_t);
 extern int  FidVolEq(dir_file_t, afs_int32 vid);
 extern void FidCpy(dir_file_t, dir_file_t fromfile);
 
-extern void Die(char *msg);
-
 int
 DStat(int *abuffers, int *acalls, int *aios)
 {
index f5f98d7c59dfcc1106e8b9d935ef3e5396995b7b..3d1055a0ab9361fd4fd10553568176472f7ca0a3 100644 (file)
@@ -84,6 +84,7 @@ typedef struct dcache * dir_file_t;
 #else
 struct DirHandle;
 typedef struct DirHandle * dir_file_t;
+extern void Die(const char *msg) AFS_NORETURN;
 #endif
 
 extern int afs_dir_NameBlobs(char *name);
index d984c118f92d5a2ba026132bc2f5bf4f2d6f996a..a20a67dad30547720ea7356749bca83b7f9e5a5c 100644 (file)
@@ -22,8 +22,6 @@
 /* Defined in vol/vol-salvage.c */
 extern void Log(const char *format, ...)
     AFS_ATTRIBUTE_FORMAT(__printf__, 1, 2);
-/* Defined in vol/physio.c */
-extern void Die(char *);
 
 #define printf Log             /* To make it work with volume salvager */
 
index 6cc25aba1bc8c1f0dab6740359eb0d6d539d4f56..b36c2ea8435c8ad2f6ba71fd611765172f87dc3a 100644 (file)
@@ -1521,7 +1521,7 @@ CheckParms(void)
 
 /* Miscellaneous routines */
 void
-Die(char *msg)
+Die(const char *msg)
 {
 
     ViceLogThenPanic(0, ("%s\n", msg));
index d7191b9c29607612255848a72d0aa131304e0ab3..c41584de140cb4d895bbfdaaa0932f222bce94e9 100644 (file)
@@ -155,7 +155,7 @@ FidCpy(DirHandle * tofile, DirHandle * fromfile)
 }
 
 void
-Die(char *msg)
+Die(const char *msg)
 {
     printf("%s\n", msg);
     osi_Panic("%s\n", msg);
index b988793e0239ef00c6ddc2fd42a6d5e512ddd110..00451004c711485d45a6e9341073a6971982f012 100644 (file)
@@ -142,7 +142,7 @@ FidCpy(DirHandle * tofile, DirHandle * fromfile)
 }
 
 void
-Die(char *msg)
+Die(const char *msg)
 {
     printf("%s\n", msg);
     osi_Panic("%s\n", msg);