[PATCH 3/8] svn-fe: do not use "return" for tail call returning void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As v1.7.4-rc0~184 (2010-10-04) reminds us, a void function shouldn't
try to return something.

Noticed with gcc -pedantic:

 vcs-svn/svndump.c: In function 'handle_node':
 vcs-svn/svndump.c:213:3: warning: ISO C forbids 'return' with expression,
  in function returning void [-pedantic]

Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx>
---
 vcs-svn/svndump.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index ee7c0bb..3a0a75e 100644
--- a/vcs-svn/svndump.c
+++ b/vcs-svn/svndump.c
@@ -210,7 +210,8 @@ static void handle_node(void)
 		if (mark || have_props || node_ctx.srcRev)
 			die("invalid dump: deletion node has "
 				"copyfrom info, text, or properties");
-		return repo_delete(node_ctx.dst);
+		repo_delete(node_ctx.dst);
+		return;
 	}
 	if (node_ctx.action == NODEACT_REPLACE) {
 		repo_delete(node_ctx.dst);
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]