Remove some GCC library warnings

This commit is contained in:
Erik van der Kouwe 2009-12-17 08:43:31 +00:00
parent e090013056
commit ac900e59ba
3 changed files with 6 additions and 2 deletions

View file

@ -17,6 +17,7 @@ abort(void)
{ {
if (_clean) _clean(); /* flush all output files */ if (_clean) _clean(); /* flush all output files */
raise(SIGABRT); raise(SIGABRT);
exit(-1);
/* NORETURN */ /* NORETURN */
} }

View file

@ -9,6 +9,9 @@ settimeofday.c
int settimeofday(const struct timeval *tp, const void *tzp) int settimeofday(const struct timeval *tp, const void *tzp)
{ {
/* Use intermediate variable because stime param is not const */
time_t sec = tp->tv_sec;
/* Ignore time zones */ /* Ignore time zones */
return stime(&tp->tv_sec); return stime(&sec);
} }

View file

@ -22,7 +22,7 @@
PRIVATE char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */ PRIVATE char cpath[CPROF_CPATH_MAX_LEN]; /* current call path string */
PRIVATE int cpath_len; /* current call path len */ PRIVATE int cpath_len; /* current call path len */
PRIVATE struct cprof_tbl_s *cprof_slot; /* slot of current function */ PRIVATE struct cprof_tbl_s *cprof_slot; /* slot of current function */
PRIVATE struct stack_s { /* stack entry */ struct stack_s { /* stack entry */
int cpath_len; /* call path len */ int cpath_len; /* call path len */
struct cprof_tbl_s *slot; /* table slot */ struct cprof_tbl_s *slot; /* table slot */
u64_t start_1; /* count @ begin of procentry */ u64_t start_1; /* count @ begin of procentry */