commit 42e1ef5d1443a8b988d11b30f1c1ffa7ce549f7f
parent 91815eec5d353bce1515f550925d7cd0bd304424
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Tue, 17 Nov 2020 10:50:48 +0100
Fix warnings
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/green-compute.c b/src/green-compute.c
@@ -58,8 +58,8 @@ log_record_create
record = MEM_ALLOC(allocator, sizeof(*record));
if(!record) return RES_MEM_ERR;
record->type = type;
- record->line_num = UINT_MAX;
- record->var_num = UINT_MAX;
+ record->line_num = -1;
+ record->var_num = -1;
record->keep_line = NULL;
record->default_value = INF;
str_init(allocator, &record->name);
@@ -470,7 +470,7 @@ parse_line
if((tk_name == NULL) != (tk_value == NULL)) {
/* '<name> = <value>' or '' */
ERR(log_record_create(green->allocator, RECORD_INVALID, &record));
- if(tk_name) ERR(str_set(&record->name, tk_name));
+ if(tk_name) { ERR(str_set(&record->name, tk_name)); }
res = RES_BAD_ARG;
goto push_record;
}