« Previous | Next » 

Revision 5f2c23e6

ID5f2c23e61a7cebed05a43dda127c83a21c681420

Added by Stefan Weil almost 12 years ago

ppce500_spin: Replace assert by hw_error (fixes compiler warning)

The default case in function spin_read should never be reached,
therefore the old code used assert(0) to abort QEMU.

This does not work when QEMU is compiled with macro NDEBUG defined.
In this case (and also when the compiler does not know that assert
never returns), there is a compiler warning because of the missing
return value.

Using hw_error allows an improved error message and aborts always.

Signed-off-by: Stefan Weil <>
[agraf: use func]
Signed-off-by: Alexander Graf <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences