mirror of
https://github.com/samba-team/samba.git
synced 2025-12-04 08:23:50 +03:00
r14751: Use the noreturn attribute to try and tell coverity that
smb_panic can't return. Jeremy.
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
d56ed46fae
commit
ba9c98983e
@@ -1553,4 +1553,13 @@ LDAP *ldap_open_with_timeout(const char *server, int port, unsigned int to);
|
|||||||
#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr)))
|
#define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr)))
|
||||||
#define CONST_ADD(type, ptr) ((type) ((const void *) (ptr)))
|
#define CONST_ADD(type, ptr) ((type) ((const void *) (ptr)))
|
||||||
|
|
||||||
|
#ifndef NORETURN_ATTRIBUTE
|
||||||
|
#if (__GNUC__ >= 3)
|
||||||
|
#define NORETURN_ATTRIBUTE __attribute__ ((noreturn))
|
||||||
|
#else
|
||||||
|
#define NORETURN_ATTRIBUTE
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void smb_panic( const char *why ) NORETURN_ATTRIBUTE ;
|
||||||
#endif /* _INCLUDES_H */
|
#endif /* _INCLUDES_H */
|
||||||
|
|||||||
@@ -1541,14 +1541,6 @@ gid_t nametogid(const char *name)
|
|||||||
return (gid_t)-1;
|
return (gid_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
|
||||||
legacy wrapper for smb_panic2()
|
|
||||||
********************************************************************/
|
|
||||||
void smb_panic( const char *why )
|
|
||||||
{
|
|
||||||
smb_panic2( why, True );
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
Something really nasty happened - panic !
|
Something really nasty happened - panic !
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
@@ -1557,7 +1549,7 @@ void smb_panic( const char *why )
|
|||||||
#include <libexc.h>
|
#include <libexc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void smb_panic2(const char *why, BOOL decrement_pid_count )
|
static void smb_panic2(const char *why, BOOL decrement_pid_count )
|
||||||
{
|
{
|
||||||
char *cmd;
|
char *cmd;
|
||||||
int result;
|
int result;
|
||||||
@@ -1663,6 +1655,17 @@ void smb_panic2(const char *why, BOOL decrement_pid_count )
|
|||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
|
wrapper for smb_panic2()
|
||||||
|
********************************************************************/
|
||||||
|
|
||||||
|
void smb_panic( const char *why )
|
||||||
|
{
|
||||||
|
smb_panic2( why, True );
|
||||||
|
/* Notreached. */
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
A readdir wrapper which just returns the file name.
|
A readdir wrapper which just returns the file name.
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user