]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: add noreturn markings to more hw abort/halt funcs
authorMike Frysinger <vapier@gentoo.org>
Mon, 10 Jan 2011 21:52:08 +0000 (21:52 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 10 Jan 2011 21:52:08 +0000 (21:52 +0000)
These functions either call abort() themselves, or call functions which
are already marked noreturn.  Either way, they don't return, so mark them
as such so calling code can assume this.  This fixes some uninitialized
warnings due to code paths that end in an abort function.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
sim/common/ChangeLog
sim/common/hw-device.h
sim/common/sim-hw.h

index ea0ce2070b014bc74f76688e350a4ce96f205fb7..04ea93b61ae0977efe34b702606d230a80c41efa 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-10  Mike Frysinger  <vapier@gentoo.org>
+
+       * hw-device.h (hw_abort, hw_vabort, hw_halt): Add noreturn attribute.
+       * sim-hw.h (sim_hw_abort): Likewise.
+
 2011-01-05  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-load.c (sim_load_file): Change buffer type to unsigned char *.
index 4ac61b1ad0b0d43f8254be5d17d9211aa3a9bcb7..b0f66eb53f637ad9c4c2d099c6c1e39199591302 100644 (file)
@@ -433,17 +433,17 @@ int hw_ioctl
 void hw_abort
 (struct hw *me,
  const char *fmt,
- ...) __attribute__ ((format (printf, 2, 3)));
+ ...) __attribute__ ((format (printf, 2, 3), noreturn));
 
 void hw_vabort
 (struct hw *me,
  const char *fmt,
- va_list ap);
+ va_list ap) __attribute__ ((noreturn));
 
 void hw_halt
 (struct hw *me,
  int reason,
- int status);
+ int status) __attribute__ ((noreturn));
 
 
 #define hw_trace_p(hw) ((hw)->trace_of_hw_p + 0)
index 1e0d3b37eb98a11b782658a29a4fb830b7ac54a7..e85cecc2b11b2df46a05455338545446da0239e4 100644 (file)
@@ -49,7 +49,7 @@ void sim_hw_abort
 (SIM_DESC sd,
  struct hw *hw,
  const char *fmt,
- ...) __attribute__ ((format (printf, 3, 4)));
+ ...) __attribute__ ((format (printf, 3, 4), noreturn));