summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-08-01 10:30:39 -0600
committerTom Rini <trini@konsulko.com>2020-08-04 23:30:02 -0400
commit5b1e0352c9ca995a9c9fdb79a0b1f11b9a39312e (patch)
tree81c905c18f983b0e92ec4950ab0350eeb438066b
parent2afa4d45051327de5822cb0eeaf0e64c7bd17dd1 (diff)
downloadu-boot-WIP/2020-08-04-misc-fixes.tar.gz
tools: env: Avoid an uninited warning with was_lockedWIP/2020-08-04-misc-fixes
Set this variable to 0 to avoid a warning about an unused variable. This happens on gcc 7.5.0 for me. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--tools/env/fw_env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index ccbeb5552b..66cb9d2a25 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -995,7 +995,7 @@ static int flash_write_buf(int dev, int fd, void *buf, size_t count)
of the data */
loff_t blockstart; /* running start of the current block -
MEMGETBADBLOCK needs 64 bits */
- int was_locked; /* flash lock flag */
+ int was_locked = 0; /* flash lock flag */
int rc;
/*