Fix warnings due to missing __dead attribute on exit
This commit is contained in:
parent
591201c1a0
commit
ada0b4ca04
2 changed files with 4 additions and 3 deletions
|
@ -8,6 +8,7 @@
|
|||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/null.h>
|
||||
|
||||
#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( void *calloc, (size_t _nmemb, size_t _size) );
|
||||
_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( char *getenv, (const char *_name) );
|
||||
_PROTOTYPE( long labs, (long _j) );
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
void (*__functab[NEXITS])(void);
|
||||
int __funccnt = 0;
|
||||
|
||||
extern void _exit(int);
|
||||
extern __dead void _exit(int);
|
||||
|
||||
/* only flush output buffers when necessary */
|
||||
int (*_clean)(void) = NULL;
|
||||
|
@ -27,7 +27,7 @@ _calls(void)
|
|||
(*__functab[i])();
|
||||
}
|
||||
|
||||
void
|
||||
__dead void
|
||||
exit(int status)
|
||||
{
|
||||
_calls();
|
||||
|
|
Loading…
Reference in a new issue