All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers
@ 2016-09-14  6:40 Mike Ralphson
  2016-09-14 15:56 ` Junio C Hamano
  2016-09-14 19:11 ` Jeff King
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Ralphson @ 2016-09-14  6:40 UTC (permalink / raw)
  To: git

Two instances of %ld being used for unsigned longs

Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
---
 vcs-svn/fast_export.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index bd0f2c2..97cba39 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -73,7 +73,7 @@ void fast_export_begin_note(uint32_t revision, const char *author,
 	static int firstnote = 1;
 	size_t loglen = strlen(log);
 	printf("commit %s\n", note_ref);
-	printf("committer %s <%s@%s> %ld +0000\n", author, author, "local", timestamp);
+	printf("committer %s <%s@%s> %lu +0000\n", author, author, "local", timestamp);
 	printf("data %"PRIuMAX"\n", (uintmax_t)loglen);
 	fwrite(log, loglen, 1, stdout);
 	if (firstnote) {
@@ -107,7 +107,7 @@ void fast_export_begin_commit(uint32_t revision, const char *author,
 	}
 	printf("commit %s\n", local_ref);
 	printf("mark :%"PRIu32"\n", revision);
-	printf("committer %s <%s@%s> %ld +0000\n",
+	printf("committer %s <%s@%s> %lu +0000\n",
 		   *author ? author : "nobody",
 		   *author ? author : "nobody",
 		   *uuid ? uuid : "local", timestamp);

--
https://github.com/git/git/pull/293

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers
  2016-09-14  6:40 [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers Mike Ralphson
@ 2016-09-14 15:56 ` Junio C Hamano
  2016-09-14 19:11 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2016-09-14 15:56 UTC (permalink / raw)
  To: Mike Ralphson; +Cc: git

Mike Ralphson <mike.ralphson@gmail.com> writes:

> Two instances of %ld being used for unsigned longs.
>
> Signed-off-by: Mike Ralphson <mike.ralphson@gmail.com>
> ---

Good eyes.  Thanks for spotting.

>  vcs-svn/fast_export.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
> index bd0f2c2..97cba39 100644
> --- a/vcs-svn/fast_export.c
> +++ b/vcs-svn/fast_export.c
> @@ -73,7 +73,7 @@ void fast_export_begin_note(uint32_t revision, const char *author,
>  	static int firstnote = 1;
>  	size_t loglen = strlen(log);
>  	printf("commit %s\n", note_ref);
> -	printf("committer %s <%s@%s> %ld +0000\n", author, author, "local", timestamp);
> +	printf("committer %s <%s@%s> %lu +0000\n", author, author, "local", timestamp);
>  	printf("data %"PRIuMAX"\n", (uintmax_t)loglen);
>  	fwrite(log, loglen, 1, stdout);
>  	if (firstnote) {
> @@ -107,7 +107,7 @@ void fast_export_begin_commit(uint32_t revision, const char *author,
>  	}
>  	printf("commit %s\n", local_ref);
>  	printf("mark :%"PRIu32"\n", revision);
> -	printf("committer %s <%s@%s> %ld +0000\n",
> +	printf("committer %s <%s@%s> %lu +0000\n",
>  		   *author ? author : "nobody",
>  		   *author ? author : "nobody",
>  		   *uuid ? uuid : "local", timestamp);
>
> --
> https://github.com/git/git/pull/293

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers
  2016-09-14  6:40 [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers Mike Ralphson
  2016-09-14 15:56 ` Junio C Hamano
@ 2016-09-14 19:11 ` Jeff King
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2016-09-14 19:11 UTC (permalink / raw)
  To: Mike Ralphson; +Cc: git

On Wed, Sep 14, 2016 at 06:40:57AM +0000, Mike Ralphson wrote:

> Two instances of %ld being used for unsigned longs

Obviously this is an improvement, but I'm kind of surprised that
compiler warnings didn't flag this. I couldn't find a "-W" combination
that noticed, though (at least not with gcc 6).

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-14 19:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-14  6:40 [PATCH] vcs-svn/fast_export: fix timestamp fmt specifiers Mike Ralphson
2016-09-14 15:56 ` Junio C Hamano
2016-09-14 19:11 ` Jeff King

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.