]> Zhao Yanbai Git Server - minix.git/commitdiff
Remove some GCC library warnings
authorErik van der Kouwe <erik@minix3.org>
Thu, 17 Dec 2009 08:43:31 +0000 (08:43 +0000)
committerErik van der Kouwe <erik@minix3.org>
Thu, 17 Dec 2009 08:43:31 +0000 (08:43 +0000)
lib/ansi/abort.c
lib/other/settimeofday.c
lib/sysutil/profile.c

index 8013b69cf2c13ebb79cace0ac8922f97208428cc..454d0e66c4da12aa46ee0418248d06030d392f52 100644 (file)
@@ -17,6 +17,7 @@ abort(void)
 {
        if (_clean) _clean();           /* flush all output files */
        raise(SIGABRT);
+       exit(-1);
        /* NORETURN */
 }
 
index 956135a38238775a5b78038f8691553bf124b9df..eed953bab10568838128c49f95fd82c6626363b6 100644 (file)
@@ -9,6 +9,9 @@ settimeofday.c
 
 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 */
-       return stime(&tp->tv_sec);
+       return stime(&sec);
 }
index e8523080a3e84c1b5d473960a035618449a8ae4b..beb16b269f5c30e3739ed5a95000ad12673cb2cf 100644 (file)
@@ -22,7 +22,7 @@
 PRIVATE char cpath[CPROF_CPATH_MAX_LEN];       /* current call path string */
 PRIVATE int cpath_len;                         /* current call path len */
 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 */
                struct cprof_tbl_s *slot;       /* table slot */
                u64_t start_1;                  /* count @ begin of procentry */