From 563a1827793483d275eb3f1937493d7afa6fb7e5 Mon Sep 17 00:00:00 2001 From: Balaji Manigandan B Date: Tue, 27 Apr 2021 23:54:17 +0530 Subject: util/ectool.c: Fixing uninitialized variable error While building chromeec outside of chroot environment, warnings are treated as errors with the default configuration. The variable "progress" is used before it was initialized and is causing the build to fail. With this change, the error is no more seen. Signed-off-by: Balaji Manigandan B Change-Id: I2ebcc6440196e005a57c09f3869ec64440f2dc17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853685 Reviewed-by: Daisuke Nojiri Tested-by: Balaji Manigandan --- util/ectool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util') diff --git a/util/ectool.c b/util/ectool.c index 364a31e6e2..e8a57c031d 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -9430,7 +9430,7 @@ static int cmd_pchg_update(int port, uint32_t address, uint32_t version, struct ec_response_pchg_update *r = ec_inbuf; FILE *fp; size_t len, total; - int progress; + int progress = 0; int rv; fp = fopen(filename, "rb"); -- cgit v1.2.1