Recent clang versions enable -Wsometimes-uninitialized under -Wall.
Since flashrom builds with -Werror, this causes the build to fail.

Initialize time_start to avoid potential use before assignment.

Change-Id: Id695ab35dab9e9ead0c8b04c0e579422f6e10244
Signed-off-by: Bhargav Rathod <[email protected]>
---
 cli_classic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cli_classic.c b/cli_classic.c
index 29f21cca..06cc4e18 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -1055,7 +1055,7 @@ int main(int argc, char *argv[])
        int ret = 0;
        int all_matched_count = 0;
        const char **all_matched_names = NULL;
-       time_t time_start, time_end;
+       time_t time_start = 0, time_end = 0;
 
        struct flashctx *context = NULL; /* holds the active detected chip and 
other info */
        ret = flashrom_create_context(&context);
-- 
2.43.0

_______________________________________________
flashrom mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to