Fix param_type_to_str

Duration wasn't in the switch. Removing the default case allows this to be
detected at compile time.
This commit is contained in:
Markus Mäkelä 2020-03-09 07:22:46 +02:00
parent eb0432b7b2
commit 2bb914b21e
No known key found for this signature in database
GPG Key ID: 5CE746D557ACC499

View File

@ -3160,10 +3160,15 @@ const char* param_type_to_str(const MXS_MODULE_PARAM* params, const char* name)
case MXS_MODULE_PARAM_PATH:
return "a path to a file";
default:
mxb_assert_message(!true, "Unknown parameter type");
return "<unknown parameter type>";
case MXS_MODULE_PARAM_DURATION:
return "a duration";
}
mxb_assert_message(!true,
"Unknown parameter type: dec %d hex %x",
params[i].type,
params[i].type);
return "<unknown parameter type>";
}
}