vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu
PATCH 1/1 vcs-svn: Fix 'fa/remote-svn' and 'fa/vcs-svn' in pu
---
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(-)
Makefile +1 -1
@@ -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)
vcs-svn/svndump.c +2 -2
@@ -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; } }
Signature · 1 line
1.7.12
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
Quoted 76 lines · On Thursday 23 August 2012 18:55:39 Ramsay Jones wrote:
Signed-off-by Ramsay Jones <[email protected]>---
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 1This 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 toMakefile", 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 typevcs-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 commit78d9d4138("vcs-svn/svndump: rewritehandle_node(), begin|end_revision()", 20-08-2012).HTH
ATB,
Ramsay JonesMakefile | 2 +- vcs-svn/svndump.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)Makefile +0
-0@@ -2356,7 +2356,7 @@ git-http-push$X: revision.o http.o http-push.oGIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ $(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
Makefile +1
-1-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)
vcs-svn/svndump.c +2
-2@@ -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; } }
Quoted 5 lines · Florian Achleitner
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