* [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t.
@ 2011-10-28 22:13 Gabe Black
2011-10-28 23:23 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Gabe Black @ 2011-10-28 22:13 UTC (permalink / raw)
To: u-boot
Signed-off-by: Gabe Black <gabeblack@chromium.org>
---
common/cmd_nvedit.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c
index 396a171..d9dc3f2 100644
--- a/common/cmd_nvedit.c
+++ b/common/cmd_nvedit.c
@@ -862,7 +862,7 @@ static int do_env_import(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv
" - truncated\n", MAX_ENV_SIZE);
}
++size;
- printf("## Info: input data size = %zd = 0x%zX\n", size, size);
+ printf("## Info: input data size = %zu = 0x%zX\n", size, size);
}
if (chk) {
--
1.7.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t.
2011-10-28 22:13 [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t Gabe Black
@ 2011-10-28 23:23 ` Mike Frysinger
2011-11-01 3:09 ` Gabe Black
0 siblings, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2011-10-28 23:23 UTC (permalink / raw)
To: u-boot
generally the subject/changelog should be more of the form:
cmd_nvedit: fix printf warning
gcc warns when using %zd with size_t types since the correct format is %zu:
<insert gcc warning here>
otherwise, the change (in theory) makes perfect sense to me ... i
would ack if not for the commit summary/log ;)
-mike
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t.
2011-10-28 23:23 ` Mike Frysinger
@ 2011-11-01 3:09 ` Gabe Black
2011-11-04 2:15 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Gabe Black @ 2011-11-01 3:09 UTC (permalink / raw)
To: u-boot
This was necessary at one point, but I've been trying to get that warning
to happen again so I can add it to the change message and it won't. These
early patches were done 5 or 6 months ago with a different version of the
repository, a different compiler, on a different system, etc., so it'd be
tricky to figure out exactly what was triggering this before.
I think the changed version is genuinely more correct, but since I can't
get gcc to complain now it doesn't seem like that serious a problem. I'd
say take it or leave it as you see fit, and I'll try a few more things to
see if I can get it to happen again.
Gabe
On Fri, Oct 28, 2011 at 4:23 PM, Mike Frysinger <vapier@gentoo.org> wrote:
> generally the subject/changelog should be more of the form:
>
> cmd_nvedit: fix printf warning
>
> gcc warns when using %zd with size_t types since the correct format is %zu:
> <insert gcc warning here>
>
> otherwise, the change (in theory) makes perfect sense to me ... i
> would ack if not for the commit summary/log ;)
> -mike
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t.
2011-11-01 3:09 ` Gabe Black
@ 2011-11-04 2:15 ` Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2011-11-04 2:15 UTC (permalink / raw)
To: u-boot
On Monday 31 October 2011 23:09:39 Gabe Black wrote:
> This was necessary at one point, but I've been trying to get that warning
> to happen again so I can add it to the change message and it won't. These
> early patches were done 5 or 6 months ago with a different version of the
> repository, a different compiler, on a different system, etc., so it'd be
> tricky to figure out exactly what was triggering this before.
>
> I think the changed version is genuinely more correct, but since I can't
> get gcc to complain now it doesn't seem like that serious a problem. I'd
> say take it or leave it as you see fit, and I'll try a few more things to
> see if I can get it to happen again.
your change was correct. but it seems a newer patch by Simon includes this fix
among others, so it's no longer needed.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111103/82bbf245/attachment.pgp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-11-04 2:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-28 22:13 [U-Boot] [PATCH] The type expected by %zd is ssize_t, but it was being passed a size_t Gabe Black
2011-10-28 23:23 ` Mike Frysinger
2011-11-01 3:09 ` Gabe Black
2011-11-04 2:15 ` Mike Frysinger
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.