Add -Wall,-Werror compiler flags
This commit is contained in:
@@ -31,6 +31,9 @@ LISP_FUNC_1(ucl_builtin_type, scope, arg) {
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return ucl_error_create("Unreachable error in 'ucl_builtin_type'");
|
||||
}
|
||||
|
||||
LISP_FUNC_1(ucl_builtin_error, scope, arg) {
|
||||
@@ -147,7 +150,7 @@ LISP_FUNC_2(ucl_builtin_concat, scope, arg0, arg1) {
|
||||
}
|
||||
|
||||
int len = strlen(arg0->string) + strlen(arg1->string);
|
||||
char *outstr = malloc(strlen(arg0->string) + strlen(arg1->string));
|
||||
char *outstr = malloc(len);
|
||||
outstr[0] = '\0';
|
||||
strcat(outstr, arg0->string);
|
||||
strcat(outstr, arg1->string);
|
||||
|
||||
@@ -91,4 +91,7 @@ struct ucl_object *ucl_evaluate(struct ucl_scope *scope, struct ucl_object *obj)
|
||||
assert(0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return ucl_error_create("Unreachable error in ucl_evaluate");
|
||||
}
|
||||
|
||||
@@ -115,6 +115,7 @@ void ucl_object_delete(struct ucl_object *obj) {
|
||||
break;
|
||||
case UCL_TYPE_INT:
|
||||
case UCL_TYPE_BUILTIN:
|
||||
case UCL_TYPE_SPECIAL:
|
||||
case UCL_TYPE_COUNT:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,9 @@ void ucl_print_obj(struct ucl_object *obj) {
|
||||
case UCL_TYPE_BUILTIN:
|
||||
printf("<builtin %p>", obj->builtin);
|
||||
break;
|
||||
case UCL_TYPE_SPECIAL:
|
||||
printf("<special %p>", obj->special);
|
||||
break;
|
||||
case UCL_TYPE_CELL: {
|
||||
int first = true;
|
||||
printf("%s", "(");
|
||||
@@ -212,4 +215,6 @@ struct ucl_object *ucl_equal(
|
||||
return ucl_error_create("");
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return ucl_error_create("Unreachable error in ucl_equal");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user