summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/stdio.c
diff options
context:
space:
mode:
authorsyrinx <syrinx@FreeBSD.org>2006-12-15 20:01:57 +0000
committersyrinx <syrinx@FreeBSD.org>2006-12-15 20:01:57 +0000
commit358a7eb8bf0bcec55c098afb6b76697eec5e3b6e (patch)
treeb6a41d4287c0f881f454af24bcdd77d8365847d7 /lib/libc/stdio/stdio.c
parent6e9534365d1b39363503d66a3d1942dc144e1aa4 (diff)
downloadFreeBSD-src-358a7eb8bf0bcec55c098afb6b76697eec5e3b6e.zip
FreeBSD-src-358a7eb8bf0bcec55c098afb6b76697eec5e3b6e.tar.gz
Do not add 'default:' cases inside a switch() on an enum like the
SNMP option argument. That way the compiler will give a warning in case of a missing or an extra but unknown 'case:'. Do the same for SNMP LEAF objects to be prepared once gensnmptree will auto-generate enums for those too. Add an abort() after the switch() instead of the 'default:' to catch any errors. The nice side effect is that the compiler will correctly track supposed to be 'uninitialized' variables with that. When trying to set a value sanity check it before calling the OS dependent API of snmp_bridge to tell whether it is an attempt to set a bad value or a general error. Suggested by: harti (first part) Approved by: bz (mentor)
Diffstat (limited to 'lib/libc/stdio/stdio.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud