We are about to add a new enumeration constant (NUM_CHARSETS) to
charset_t. To do that we must have a default case in this switch
statement, or the compiler will refuse to compile it, stating that we
haven’t handled all the cases.
The alternative, adding a case for NUM_CHARSETS, would just look silly.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
case CH_DOS:
case CH_UNIX:
return strlen((const char *)var)+1;
+ default:
+ /* Fallback, this should never happen */
+ return strlen((const char *)var)+1;
}
-
- /* Fallback, this should never happen */
- return strlen((const char *)var)+1;
}