32 lines
986 B
Diff
32 lines
986 B
Diff
commit 40375f3babd5a52e0e9d5f2abe4a9332505e702d
|
|
Author: Miroslav Lichvar <mlichvar@redhat.com>
|
|
Date: Mon Jun 19 11:57:18 2023 +0200
|
|
|
|
Avoid -Wmaybe-uninitialized warning
|
|
|
|
This avoids the following false positive from gcc:
|
|
|
|
config.c:352:28: error: 'df' may be used uninitialized [-Werror=maybe-uninitialized]
|
|
352 | dst->val.d = df;
|
|
| ^
|
|
config.c: In function 'config_read':
|
|
config.c:286:16: note: 'df' was declared here
|
|
286 | double df;
|
|
| ^
|
|
|
|
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
|
|
|
|
diff --git a/config.c b/config.c
|
|
index 946e508..26f3c82 100644
|
|
--- a/config.c
|
|
+++ b/config.c
|
|
@@ -283,7 +283,7 @@ static enum parser_result parse_item(struct config *cfg,
|
|
enum parser_result r;
|
|
struct config_item *cgi, *dst;
|
|
struct config_enum *cte;
|
|
- double df;
|
|
+ double df = 0.0;
|
|
int val;
|
|
|
|
r = parse_fault_interval(cfg, section, option, value);
|