Skip to contentSkip to conversation

PATCH: diff-cache.c:51: `return' with a value, in function returning void

PATCH Alex Riesen 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

gcc -g -O2 -Wall '-DSHA1_HEADER=<openssl/sha.h>' -o git-diff-cache diff-cache.c libgit.a -lz -lssl diff-cache.c: In function `show_new_file':
diff-cache.c:51: warning: `return' with a value, in function returning void

diff-cache.c +0 -1
@@ -48,7 +48,6 @@ static void show_new_file(struct cache_e
 		return;
 
 	show_file("+", new, sha1, mode);
-	return 0;
 }
 
 static int show_modified(struct cache_entry *old, struct cache_entry *new)
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"AR" == Alex Riesen <[email protected]> writes:

AR> gcc -g -O2 -Wall '-DSHA1_HEADER=<openssl/sha.h>' -o git-diff-cache diff-cache.c libgit.a -lz -lssl AR> diff-cache.c: In function `show_new_file':
AR> diff-cache.c:51: warning: `return' with a value, in function returning void

This one was fixed in the Linus tree long time ago.

#2 lore raw

Junio C Hamano, Tue, May 03, 2005 23:33:22 +0200:

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"AR" == Alex Riesen <[email protected]> writes:

AR> gcc -g -O2 -Wall '-DSHA1_HEADER=<openssl/sha.h>' -o git-diff-cache diff-cache.c libgit.a -lz -lssl AR> diff-cache.c: In function `show_new_file':
AR> diff-cache.c:51: warning: `return' with a value, in function returning void

This one was fixed in the Linus tree long time ago.

Oh, sorry: it was cogito today.