{"thread":{"id":"31588","subject":"[PATCH] grep.c: Fix a sparse warning","startedAt":"2012-09-18T17:30:25Z","lastAt":"2012-09-18T19:49:32Z","messageCount":2,"participants":["Ramsay Jones","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"199380","messageId":"5058AFB1.3040600@ramsay1.demon.co.uk","threadId":"31588","inReplyTo":null,"subject":"[PATCH] grep.c: Fix a sparse warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2012-09-18T17:30:25Z","receivedAt":"2012-09-18T17:30:25Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, sparse complains that \"... 'dump_grep_expression'\nwas not declared. Should it be static?\". In order to suppress\nthe warning, since this function does not need more than file\nscope, we simply include the static modifier in it's declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nHi Junio,\n\nI prefer to catch these before they progress to next, but it seems\nI've not been quick enough lately! Sorry about that. :(  [I will have\nto git-fetch more frequently; at present I only fetch about 3 times\na week.]\n\nI've been away for a few days, so I'm well behind ... (I'm just\nabout to download 350+ emails for me to read tonight!).\n\nATB,\nRamsay Jones\n\n grep.c | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/grep.c b/grep.c\nindex 925aa92..38c4d75 100644\n--- a/grep.c\n+++ b/grep.c\n@@ -403,7 +403,7 @@ static void dump_grep_expression_1(struct grep_expr *x, int in)\n \t}\n }\n \n-void dump_grep_expression(struct grep_opt *opt)\n+static void dump_grep_expression(struct grep_opt *opt)\n {\n \tstruct grep_expr *x = opt->pattern_expression;\n \n-- \n1.7.12\n"},{"id":"199397","messageId":"7v7grrm7qr.fsf@alter.siamese.dyndns.org","threadId":"31588","inReplyTo":"5058AFB1.3040600@ramsay1.demon.co.uk","subject":"Re: [PATCH] grep.c: Fix a sparse warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2012-09-18T19:49:32Z","receivedAt":"2012-09-18T19:49:32Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> In particular, sparse complains that \"... 'dump_grep_expression'\n> was not declared. Should it be static?\". In order to suppress\n> the warning, since this function does not need more than file\n> scope, we simply include the static modifier in it's declaration.\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>\n> Hi Junio,\n>\n> I prefer to catch these before they progress to next, but it seems\n> I've not been quick enough lately! Sorry about that. :(  [I will have\n> to git-fetch more frequently; at present I only fetch about 3 times\n> a week.]\n>\n> I've been away for a few days, so I'm well behind ... (I'm just\n> about to download 350+ emails for me to read tonight!).\n\nThanks; doesn't 07a7d65 (grep.c: mark private file-scope symbols as\nstatic, 2012-09-15) cover this already, though?\n\n>\n> ATB,\n> Ramsay Jones\n>\n>  grep.c | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n>\n> diff --git a/grep.c b/grep.c\n> index 925aa92..38c4d75 100644\n> --- a/grep.c\n> +++ b/grep.c\n> @@ -403,7 +403,7 @@ static void dump_grep_expression_1(struct grep_expr *x, int in)\n>  \t}\n>  }\n>  \n> -void dump_grep_expression(struct grep_opt *opt)\n> +static void dump_grep_expression(struct grep_opt *opt)\n>  {\n>  \tstruct grep_expr *x = opt->pattern_expression;\n"}]}