vcs-svn: a void function shouldn't try to return something
As v1.7.4-rc0~184 (2010-10-04) and C99 §6.8.6.4.1 remind us, standard C does not permit returning an expression of type void, even for a tail call. 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] [jn: with simplified log message] Signed-off-by: Michael Witten <mfwitten@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Michael Witten committed
Mar 29, 2011 at 17:31 UTC
9e113988d3d95f1595e2c33f704defeb2cbcc5d6
1 file changed
+2
-1
vcs-svn/svndump.c
+2
-1
@@ -214,7 +214,8 @@ static void handle_node(void)
214
if (have_text || have_props || node_ctx.srcRev)
215
die("invalid dump: deletion node has "
216
"copyfrom info, text, or properties");
217
- return repo_delete(node_ctx.dst);
217
+ repo_delete(node_ctx.dst);
218
+ return;
219
}
220
if (node_ctx.action == NODEACT_REPLACE) {
221
repo_delete(node_ctx.dst);