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