added default returns to generated enum functions

This commit is contained in:
Sara 2023-09-13 12:45:51 +02:00
parent 19deaea93e
commit e34a00086a
2 changed files with 4 additions and 0 deletions

View file

@ -196,6 +196,7 @@ int kwil_enum_generate_json_length(struct kwil_enum_t* self, FILE* file, const c
self->enum_values[option_index].name, strlen(self->enum_values[option_index].name));
}
fprintf(file, " }\\\n"
" return 2;\\\n"
"}\\\n");
return 0;
}
@ -213,6 +214,7 @@ int kwil_enum_generate_to_json(struct kwil_enum_t* self, FILE* file, const char*
}
fprintf(file, " }\\\n"
" return sprintf(out, \"\\\"\\\"\");\\\n"
"}\\\n");
return 0;
}