Skip to content

Commit 97a57b3

Browse files
committed
Fix uninitialized variable warning
1 parent 03c42cf commit 97a57b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/serialization/JsonSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ bool JsonSerial::ParseShockerCommand(const cJSON* root, JsonSerial::ShockerComma
2222
OS_LOGE(TAG, "value at 'model' is not a string");
2323
return false;
2424
}
25-
ShockerModelType modelType;
25+
ShockerModelType modelType = ShockerModelType::MIN;
2626
if (!ShockerModelTypeFromString(model->valuestring, modelType)) {
2727
OS_LOGE(TAG, "value at 'model' is not a valid shocker model (caixianlin, petrainer, petrainer998dr)");
2828
return false;

0 commit comments

Comments
 (0)