{"thread":{"id":"368","subject":"[PATCH] diff-cache.c compilation warning fix.","startedAt":"2005-04-28T04:15:11Z","lastAt":"2005-04-28T04:59:55Z","messageCount":2,"participants":["Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"1987","messageId":"7vekcvbkq8.fsf@assigned-by-dhcp.cox.net","threadId":"368","inReplyTo":null,"subject":"[PATCH] diff-cache.c compilation warning fix.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-28T04:15:11Z","receivedAt":"2005-04-28T04:15:11Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nobody uses return value from show_new_file() function but it is\ndefined as returning int and falls off at the end without\nreturning.  Make it void.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\ndiff-cache.c |    2 +-\n1 files changed, 1 insertion(+), 1 deletion(-)\n\n# - [PATCH] diff-tree -p implies diff-tree -p -r\n# + working tree\n--- k/diff-cache.c\n+++ l/diff-cache.c\n@@ -38,7 +38,7 @@ static int get_stat_data(struct cache_en\n \treturn 0;\n }\n \n-static int show_new_file(struct cache_entry *new)\n+static void show_new_file(struct cache_entry *new)\n {\n \tunsigned char *sha1;\n \tunsigned int mode;\n\n"},{"id":"1992","messageId":"7vzmvja438.fsf@assigned-by-dhcp.cox.net","threadId":"368","inReplyTo":"7vekcvbkq8.fsf@assigned-by-dhcp.cox.net","subject":"[PATCH (take 2)] diff-cache.c compilation warning fix.","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-28T04:59:55Z","receivedAt":"2005-04-28T04:59:55Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Nobody uses return value from show_new_file() function but it is\ndefined as returning int and falls off at the end without\nreturning.  Make it void.\n\nSigned-off-by: Junio C Hamano <junkio@cox.net>\n---\n\nThis is take 2.  Earlier one was a botched patch that left\n\"return -1\" in the function.\n\ndiff-cache.c |    4 ++--\n1 files changed, 2 insertions(+), 2 deletions(-)\n\n# - [PATCH] diff-tree -p implies diff-tree -p -r\n# + 04/27 21:50 diff.c clean up temporary file.\n--- k/diff-cache.c\n+++ l/diff-cache.c\n@@ -38,14 +38,14 @@ static int get_stat_data(struct cache_en\n \treturn 0;\n }\n \n-static int show_new_file(struct cache_entry *new)\n+static void show_new_file(struct cache_entry *new)\n {\n \tunsigned char *sha1;\n \tunsigned int mode;\n \n \t/* New file in the index: it might actually be different in the working copy */\n \tif (get_stat_data(new, &sha1, &mode) < 0)\n-\t\treturn -1;\n+\t\treturn;\n \n \tshow_file(\"+\", new, sha1, mode);\n }\n\n"}]}