lib/mbsalign: abort() when non-expected case is encountered
Fixes the following compiler warning (9 occurrences), and makes program to crash if mbsaligh() is called with unexpected align value (which would be programming error). ../lib/mbsalign.c:260:7: warning: switch missing default case [-Wswitch-default] Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
9481c7b33b
commit
ce7b11a98e
|
@ -271,6 +271,8 @@ mbsalign_unibyte:
|
|||
start_spaces = n_spaces;
|
||||
end_spaces = 0;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
|
||||
dest = mbs_align_pad (dest, dest_end, start_spaces);
|
||||
|
|
Loading…
Reference in New Issue