{"thread":{"id":"39092","subject":"[PATCH] sha1_file.c: make parse_sha1_header_extended() static","startedAt":"2015-04-16T12:25:25Z","lastAt":"2015-04-17T02:03:47Z","messageCount":2,"participants":["Ramsay Jones","Karthik Nayak"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"259488","messageId":"552FAA35.4050806@ramsay1.demon.co.uk","threadId":"39092","inReplyTo":null,"subject":"[PATCH] sha1_file.c: make parse_sha1_header_extended() static","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2015-04-16T12:25:25Z","receivedAt":"2015-04-16T12:25:25Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\ncommit 9e1f5bc0 (\"sha1_file.c: support reading from a loose object of\nunknown type\", 15-04-2015) added a new externally visible function\nwhich does not require more than file scope. This causes sparse to\nissue a warning message about this symbol. In order to suppress the\nwarning, add the static qualifier to the function definition.\n\n[An alternative solution, if this symbol should have external scope,\nis to add an external declaration for the function to the \"cache.h\"\nheader file (next to the one for parse_sha1_header()).]\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Karthik,\n\nIf you need to re-roll your patches in the 'kn/cat-file-literally'\nbranch, could you please squash this, or something like it, into\nthe relevant patch.\n\nThanks!\n\nATB,\nRamsay Jones\n\n sha1_file.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/sha1_file.c b/sha1_file.c\nindex 267399d..2b81534 100644\n--- a/sha1_file.c\n+++ b/sha1_file.c\n@@ -1642,7 +1642,7 @@ static void *unpack_sha1_rest(git_zstream *stream, void *buffer, unsigned long s\n  * too permissive for what we want to check. So do an anal\n  * object header parse by hand.\n  */\n-int parse_sha1_header_extended(const char *hdr, struct object_info *oi,\n+static int parse_sha1_header_extended(const char *hdr, struct object_info *oi,\n \t\t\t       unsigned int flags)\n {\n \tstruct strbuf typename = STRBUF_INIT;\n-- \n2.3.0\n"},{"id":"259552","messageId":"24F2AEE2-C353-411F-9DE2-C999DC5AB454@gmail.com","threadId":"39092","inReplyTo":"552FAA35.4050806@ramsay1.demon.co.uk","subject":"Re: [PATCH] sha1_file.c: make parse_sha1_header_extended() static","fromName":"Karthik Nayak","fromEmail":"karthik.188@gmail.com","sentAt":"2015-04-17T02:03:47Z","receivedAt":"2015-04-17T02:03:47Z","isPatch":true,"sender":{"key":"karthik.188@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1786334?v=4"},"body":"\n\nOn April 16, 2015 5:55:25 PM GMT+05:30, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:\n>\n>commit 9e1f5bc0 (\"sha1_file.c: support reading from a loose object of\n>unknown type\", 15-04-2015) added a new externally visible function\n>which does not require more than file scope. This causes sparse to\n>issue a warning message about this symbol. In order to suppress the\n>warning, add the static qualifier to the function definition.\n>\n>[An alternative solution, if this symbol should have external scope,\n>is to add an external declaration for the function to the \"cache.h\"\n>header file (next to the one for parse_sha1_header()).]\n>\n>Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n>---\n>\n>Hi Karthik,\n>\n>If you need to re-roll your patches in the 'kn/cat-file-literally'\n>branch, could you please squash this, or something like it, into\n>the relevant patch.\n\nThanks for this Ramsay, will be re rolling, will squash it into my commit.\n\nRegards\nKarthik\n>\n>Thanks!\n>\n>ATB,\n>Ramsay Jones\n>\n> sha1_file.c | 2 +-\n> 1 file changed, 1 insertion(+), 1 deletion(-)\n>\n>diff --git a/sha1_file.c b/sha1_file.c\n>index 267399d..2b81534 100644\n>--- a/sha1_file.c\n>+++ b/sha1_file.c\n>@@ -1642,7 +1642,7 @@ static void *unpack_sha1_rest(git_zstream\n>*stream, void *buffer, unsigned long s\n>  * too permissive for what we want to check. So do an anal\n>  * object header parse by hand.\n>  */\n>-int parse_sha1_header_extended(const char *hdr, struct object_info\n>*oi,\n>+static int parse_sha1_header_extended(const char *hdr, struct\n>object_info *oi,\n> \t\t\t       unsigned int flags)\n> {\n> \tstruct strbuf typename = STRBUF_INIT;\n>-- \n>2.3.0\n\n-- \nSent from my Android device with K-9 Mail. Please excuse my brevity.\n"}]}