Cast result of cfgParseOptionId() to int.
It would probably make more sense to add an "invalid" enum value, but at least fix the cast for now. The function was originally designed to interface with Perl which required -1 in this case.
Found on MacOS M1.
@@ -476,7 +476,7 @@ cfgParseOptionId(const char *optionName)
for (ConfigOption optionId = 0; optionId < CFG_OPTION_TOTAL; optionId++)
if (strcmp(optionName, parseRuleOption[optionId].name) == 0)
- result = optionId;
+ result = (int)optionId;
FUNCTION_TEST_RETURN(result);
}
