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>
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)
{
#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);
/* 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 */
/* Miscellaneous routines */
void
-Die(char *msg)
+Die(const char *msg)
{
ViceLogThenPanic(0, ("%s\n", msg));
}
void
-Die(char *msg)
+Die(const char *msg)
{
printf("%s\n", msg);
osi_Panic("%s\n", msg);
}
void
-Die(char *msg)
+Die(const char *msg)
{
printf("%s\n", msg);
osi_Panic("%s\n", msg);