Fix warnings due to missing __dead attribute on exit
This commit is contained in:
parent
591201c1a0
commit
ada0b4ca04
@ -8,6 +8,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <sys/cdefs.h>
|
||||||
#include <sys/null.h>
|
#include <sys/null.h>
|
||||||
|
|
||||||
#define EXIT_FAILURE 1 /* standard error return using exit() */
|
#define EXIT_FAILURE 1 /* standard error return using exit() */
|
||||||
@ -29,7 +30,7 @@ _PROTOTYPE( int atoi, (const char *_nptr) );
|
|||||||
_PROTOTYPE( long atol, (const char *_nptr) );
|
_PROTOTYPE( long atol, (const char *_nptr) );
|
||||||
_PROTOTYPE( void *calloc, (size_t _nmemb, size_t _size) );
|
_PROTOTYPE( void *calloc, (size_t _nmemb, size_t _size) );
|
||||||
_PROTOTYPE( div_t div, (int _numer, int _denom) );
|
_PROTOTYPE( div_t div, (int _numer, int _denom) );
|
||||||
_PROTOTYPE( void exit, (int _status) );
|
_PROTOTYPE( __dead void exit, (int _status) );
|
||||||
_PROTOTYPE( void free, (void *_ptr) );
|
_PROTOTYPE( void free, (void *_ptr) );
|
||||||
_PROTOTYPE( char *getenv, (const char *_name) );
|
_PROTOTYPE( char *getenv, (const char *_name) );
|
||||||
_PROTOTYPE( long labs, (long _j) );
|
_PROTOTYPE( long labs, (long _j) );
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
void (*__functab[NEXITS])(void);
|
void (*__functab[NEXITS])(void);
|
||||||
int __funccnt = 0;
|
int __funccnt = 0;
|
||||||
|
|
||||||
extern void _exit(int);
|
extern __dead void _exit(int);
|
||||||
|
|
||||||
/* only flush output buffers when necessary */
|
/* only flush output buffers when necessary */
|
||||||
int (*_clean)(void) = NULL;
|
int (*_clean)(void) = NULL;
|
||||||
@ -27,7 +27,7 @@ _calls(void)
|
|||||||
(*__functab[i])();
|
(*__functab[i])();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
__dead void
|
||||||
exit(int status)
|
exit(int status)
|
||||||
{
|
{
|
||||||
_calls();
|
_calls();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user