diff options
| author | David Daney <[email protected]> | 2008-11-21 01:26:36 +0000 |
|---|---|---|
| committer | Ralf Baechle <[email protected]> | 2008-11-24 16:35:07 +0000 |
| commit | 8ec2e24356e63dc298c6040557faf396410907ac (patch) | |
| tree | 77615c090cec2a726a31618e66aaac7dd10a33b1 /net/unix/af_unix.c | |
| parent | Merge master.kernel.org:/home/rmk/linux-2.6-arm (diff) | |
| download | kernel-8ec2e24356e63dc298c6040557faf396410907ac.tar.gz kernel-8ec2e24356e63dc298c6040557faf396410907ac.zip | |
MIPS: Make BUG() __noreturn.
Often we do things like put BUG() in the default clause of a case
statement. Since it was not declared __noreturn, this could sometimes
lead to bogus compiler warnings that variables were used
uninitialized.
There is a small problem in that we have to put a magic while(1); loop to
fool GCC into really thinking it is noreturn. This makes the new
BUG() function 3 instructions long instead of just 1, but I think it
is worth it as it is now unnecessary to do extra work to silence the
'used uninitialized' warnings.
I also re-wrote BUG_ON so that if it is given a constant condition, it
just does BUG() instead of loading a constant value in to a register
and testing it.
Signed-off-by: David Daney <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions
