diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-22 17:15:40 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2019-09-22 17:28:12 +0200 |
commit | ee2482df88f17a9e775f0cb40d12b76ee4d9cf56 (patch) | |
tree | 67d795dc894db075a5d87470602286fce35def3d | |
parent | eb6b3771eb47bfa1fa02c0c45523af9b1061125b (diff) | |
download | genimage-ee2482df88f17a9e775f0cb40d12b76ee4d9cf56.tar.gz genimage-ee2482df88f17a9e775f0cb40d12b76ee4d9cf56.tar.xz |
pad_file: avoid uninitialized warning
extent_count is always set before it is used. But the compiler cannot know
that, because it does not know that 'errno != 0' when FS_IOC_FIEMAP fails.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -397,7 +397,7 @@ int pad_file(struct image *image, const char *infile, int f = -1, outf = -1, flags = 0; unsigned long f_offset = 0; struct extent *extents; - size_t extent_count; + size_t extent_count = 0; void *buf = NULL; int now, r, w; unsigned e; |