Explorar o código

fw_env: fix type of len

This variable is assigned by a size_t, and is printed that way, but is
incorrectly declared as an int.  Which means we get warnings:
fw_env.c: In function 'fw_setenv':
fw_env.c:409:5: warning: format '%zu' expects argument of type 'size_t',
	but argument 3 has type 'int' [-Wformat]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Mike Frysinger %!s(int64=12) %!d(string=hai) anos
pai
achega
3779c8e319
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      tools/env/fw_env.c

+ 2 - 1
tools/env/fw_env.c

@@ -429,7 +429,8 @@ int fw_env_write(char *name, char *value)
  */
 int fw_setenv(int argc, char *argv[])
 {
-	int i, len;
+	int i;
+	size_t len;
 	char *name;
 	char *value = NULL;