diff mbox series

[3/4] cmd: zip: fix implicit declaration warning

Message ID 20200522120738.13376-4-michael@walle.cc
State Accepted
Commit 2843444a6eaf1bf287aa00ad46ccfac54fac26b0
Delegated to: Tom Rini
Headers show
Series cmd: {zip, unzip} fixes | expand

Commit Message

Michael Walle May 22, 2020, 12:07 p.m. UTC
Fix the following warning:

cmd/zip.c: In function ‘do_zip’:
cmd/zip.c:30:6: warning: implicit declaration of function ‘gzip’; did you mean ‘do_zip’? [-Wimplicit-function-declaration]
  if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
      ^~~~
      do_zip

Include gzip.h header which declares the gzip() function.

Signed-off-by: Michael Walle <michael@walle.cc>
---
 cmd/zip.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Simon Glass May 22, 2020, 11:13 p.m. UTC | #1
On Fri, 22 May 2020 at 06:07, Michael Walle <michael@walle.cc> wrote:
>
> Fix the following warning:
>
> cmd/zip.c: In function ‘do_zip’:
> cmd/zip.c:30:6: warning: implicit declaration of function ‘gzip’; did you mean ‘do_zip’? [-Wimplicit-function-declaration]
>   if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
>       ^~~~
>       do_zip
>
> Include gzip.h header which declares the gzip() function.
>
> Signed-off-by: Michael Walle <michael@walle.cc>
> ---
>  cmd/zip.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini May 25, 2020, 6 p.m. UTC | #2
On Fri, May 22, 2020 at 02:07:37PM +0200, Michael Walle wrote:

> Fix the following warning:
> 
> cmd/zip.c: In function ‘do_zip’:
> cmd/zip.c:30:6: warning: implicit declaration of function ‘gzip’; did you mean ‘do_zip’? [-Wimplicit-function-declaration]
>   if (gzip((void *) dst, &dst_len, (void *) src, src_len) != 0)
>       ^~~~
>       do_zip
> 
> Include gzip.h header which declares the gzip() function.
> 
> Signed-off-by: Michael Walle <michael@walle.cc>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/cmd/zip.c b/cmd/zip.c
index b433f1889f..8ad3768464 100644
--- a/cmd/zip.c
+++ b/cmd/zip.c
@@ -7,6 +7,7 @@ 
 #include <common.h>
 #include <command.h>
 #include <env.h>
+#include <gzip.h>
 
 static int do_zip(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {