Skip to content

Commit

Permalink
fw_env: fix type of len
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
  • Loading branch information
vapier authored and trini committed Dec 19, 2012
1 parent 4823b45 commit 3779c8e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/env/fw_env.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3779c8e

Please sign in to comment.