fix build failure with gcc-4.5 due to stricter warnings with enum values in case statements

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1782 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Mike Frysinger 15 years ago
parent b462150ed3
commit a3df1304fb

@ -1,3 +1,8 @@
2010-05-05 Mike Frysinger <vapier@gentoo.org>
* src/cmd/cmd_debug.c (string_to_log_level): Tweak the -1 sanity check to
avoid warnings from gcc about -1 not being an enum value.
2010-02-16 Mike Frysinger <vapier@gentoo.org>
* data/MANUFACTURERS: Use the official ADI name.

@ -62,6 +62,9 @@ string_to_log_level (const char *strlevel)
static const char *
log_level_to_string (urj_log_level_t level)
{
/* sanity for string_to_log_level() return */
if (level == -1)
goto case_default;
switch (level) {
case URJ_LOG_LEVEL_ALL: return "all";
case URJ_LOG_LEVEL_COMM: return "comm";
@ -71,7 +74,7 @@ log_level_to_string (urj_log_level_t level)
case URJ_LOG_LEVEL_WARNING: return "warning";
case URJ_LOG_LEVEL_ERROR: return "error";
case URJ_LOG_LEVEL_SILENT: return "silent";
case -1: /* sanity for string_to_log_level() return */
case_default:
default: return "unknown";
}
}

Loading…
Cancel
Save