Git development
 help / color / mirror / Atom feed
* [PATCH] vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu
@ 2012-08-23 17:55 Ramsay Jones
  2012-08-27  7:44 ` Florian Achleitner
  0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2012-08-23 17:55 UTC (permalink / raw)
  To: florian.achleitner.2.6.31; +Cc: GIT Mailing-list, Junio C Hamano



Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

Hi Florian,

The build on pu is currently broken:

        CC remote-testsvn.o
        LINK git-remote-testsvn
    cc: vcs-svn/lib.a: No such file or directory
    make: *** [git-remote-testsvn] Error 1

This is caused by a dependency missing from the git-remote-testsvn
link rule. The addition of the $(VCSSVN_LIB) dependency, which should
be squashed into commit ea1f4afb ("Add git-remote-testsvn to Makefile",
20-08-2012), fixes the build.

However, this leads to a failure of test t9020.5 and (not unrelated)
compiler warnings:

        CC vcs-svn/svndump.o
    vcs-svn/svndump.c: In function ‘handle_node’:
    vcs-svn/svndump.c:246: warning: left shift count >= width of type
    vcs-svn/svndump.c:345: warning: format ‘%lu’ expects type ‘long \
        unsigned int’, but argument 3 has type ‘uintmax_t’

The fix for the shift count warning is to cast the lhs of the shift
expression to uintmax_t. The format warning is fixed by using the
PRIuMAX format macro. These fixes should be squashed into commit
78d9d4138 ("vcs-svn/svndump: rewrite handle_node(), begin|end_revision()",
20-08-2012).

HTH

ATB,
Ramsay Jones

 Makefile          | 2 +-
 vcs-svn/svndump.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 9cede84..761ae05 100644
--- a/Makefile
+++ b/Makefile
@@ -2356,7 +2356,7 @@ git-http-push$X: revision.o http.o http-push.o GIT-LDFLAGS $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 
-git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS)
+git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) \
 	$(VCSSVN_LIB)
 
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index 28ce2aa..eb97e8e 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -243,7 +243,7 @@ static void handle_node(struct node_ctx_t *node)
 	const char *old_data = NULL;
 	uint32_t old_mode = REPO_MODE_BLB;
 	struct strbuf sb = STRBUF_INIT;
-	static uintmax_t blobmark = 1UL << (bitsizeof(uintmax_t) - 1);
+	static uintmax_t blobmark = (uintmax_t) 1UL << (bitsizeof(uintmax_t) - 1);
 
 
 	if (have_text && type == REPO_MODE_DIR)
@@ -342,7 +342,7 @@ static void handle_node(struct node_ctx_t *node)
 						node->text_length, &input);
 			}
 
-			strbuf_addf(&sb, ":%lu", blobmark);
+			strbuf_addf(&sb, ":%"PRIuMAX, blobmark);
 			node->dataref = sb.buf;
 		}
 	}
-- 
1.7.12

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

* Re: [PATCH] vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu
  2012-08-23 17:55 [PATCH] vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu Ramsay Jones
@ 2012-08-27  7:44 ` Florian Achleitner
  2012-08-30 17:28   ` Ramsay Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Achleitner @ 2012-08-27  7:44 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: florian.achleitner.2.6.31, GIT Mailing-list, Junio C Hamano

Hi!

Thanks for your fixups. I'm currently integrating them in a new series.
On what platform did you find that problems? 
Tried to reproduce them on 64bit Linux. Anyways the fixes look very reasonable.

Florian

On Thursday 23 August 2012 18:55:39 Ramsay Jones wrote:
> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
> ---
> 
> Hi Florian,
> 
> The build on pu is currently broken:
> 
>         CC remote-testsvn.o
>         LINK git-remote-testsvn
>     cc: vcs-svn/lib.a: No such file or directory
>     make: *** [git-remote-testsvn] Error 1
> 
> This is caused by a dependency missing from the git-remote-testsvn
> link rule. The addition of the $(VCSSVN_LIB) dependency, which should
> be squashed into commit ea1f4afb ("Add git-remote-testsvn to Makefile",
> 20-08-2012), fixes the build.
> 
> However, this leads to a failure of test t9020.5 and (not unrelated)
> compiler warnings:
> 
>         CC vcs-svn/svndump.o
>     vcs-svn/svndump.c: In function ‘handle_node’:
>     vcs-svn/svndump.c:246: warning: left shift count >= width of type
>     vcs-svn/svndump.c:345: warning: format ‘%lu’ expects type ‘long \
>         unsigned int’, but argument 3 has type ‘uintmax_t’
> 
> The fix for the shift count warning is to cast the lhs of the shift
> expression to uintmax_t. The format warning is fixed by using the
> PRIuMAX format macro. These fixes should be squashed into commit
> 78d9d4138 ("vcs-svn/svndump: rewrite handle_node(), begin|end_revision()",
> 20-08-2012).
> 
> HTH
> 
> ATB,
> Ramsay Jones
> 
>  Makefile          | 2 +-
>  vcs-svn/svndump.c | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 9cede84..761ae05 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2356,7 +2356,7 @@ git-http-push$X: revision.o http.o http-push.o
> GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@
> $(ALL_LDFLAGS) $(filter %.o,$^) \ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
> 
> -git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS)
> +git-remote-testsvn$X: remote-testsvn.o GIT-LDFLAGS $(GITLIBS) $(VCSSVN_LIB)
> $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^)
> $(LIBS) \ $(VCSSVN_LIB)
> 
> diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
> index 28ce2aa..eb97e8e 100644
> --- a/vcs-svn/svndump.c
> +++ b/vcs-svn/svndump.c
> @@ -243,7 +243,7 @@ static void handle_node(struct node_ctx_t *node)
>  	const char *old_data = NULL;
>  	uint32_t old_mode = REPO_MODE_BLB;
>  	struct strbuf sb = STRBUF_INIT;
> -	static uintmax_t blobmark = 1UL << (bitsizeof(uintmax_t) - 1);
> +	static uintmax_t blobmark = (uintmax_t) 1UL << (bitsizeof(uintmax_t) - 1);
> 
> 
>  	if (have_text && type == REPO_MODE_DIR)
> @@ -342,7 +342,7 @@ static void handle_node(struct node_ctx_t *node)
>  						node->text_length, &input);
>  			}
> 
> -			strbuf_addf(&sb, ":%lu", blobmark);
> +			strbuf_addf(&sb, ":%"PRIuMAX, blobmark);
>  			node->dataref = sb.buf;
>  		}
>  	}

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

* Re: [PATCH] vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu
  2012-08-27  7:44 ` Florian Achleitner
@ 2012-08-30 17:28   ` Ramsay Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Ramsay Jones @ 2012-08-30 17:28 UTC (permalink / raw)
  To: Florian Achleitner
  Cc: florian.achleitner.2.6.31, GIT Mailing-list, Junio C Hamano

Florian Achleitner wrote:
> Hi!
> 
> Thanks for your fixups. I'm currently integrating them in a new series.
> On what platform did you find that problems? 
> Tried to reproduce them on 64bit Linux. Anyways the fixes look very reasonable.

I found the problem on Linux, cygwin and MinGW. That would be *32-bit* Linux,
cygwin and MinGW, of course. ;-)

ATB,
Ramsay Jones

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

end of thread, other threads:[~2012-08-30 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 17:55 [PATCH] vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu Ramsay Jones
2012-08-27  7:44 ` Florian Achleitner
2012-08-30 17:28   ` Ramsay Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox