[Cryptography] I don't get it.
Werner Koch
wk at gnupg.org
Wed Apr 16 15:58:32 EDT 2014
On Wed, 16 Apr 2014 15:42, sandyinchina at gmail.com said:
> < 10-line program that finds > 3800 files in the Linux kernel where
> the word "switch" occurs more often than "default". Nowhere near
> all of these will be actually be problematic, but they are worth a look.
switch statements without a default clause are useful to assert that all
enum values are handled. Compilers can and do check for non-handled
values. You do the default processing by other means.
Salam-Shalom,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the cryptography
mailing list