1. Stefan Saasen
  2. git


Michael Witten  committed 9e11398

vcs-svn: a void function shouldn't try to return something

As v1.7.4-rc0~184 (2010-10-04) and C99 § 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>

  • Participants
  • Parent commits 4c502d6
  • Branches master

Comments (0)

Files changed (1)

File vcs-svn/svndump.c

View file
  • Ignore whitespace
 		if (have_text || 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) {