git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 5/7] grep.c: mark private file-scope symbols as static

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Sep 19, 2012, 18:02 UTC
Message-ID
<505A08A1.1080303@ramsay1.demon.co.uk>
In-Reply-To
<1347743452-2487-5-git-send-email-gitster@pobox.com>
Junio C Hamano wrote:
Show 46 quoted lines
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
>  grep.c | 6 +++++-
>  grep.h | 3 +--
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/grep.c b/grep.c
> index 925aa92..c7f8a47 100644
> --- a/grep.c
> +++ b/grep.c
> @@ -3,6 +3,10 @@
>  #include "userdiff.h"
>  #include "xdiff-interface.h"
>  
> +static int grep_source_load(struct grep_source *gs);
> +static int grep_source_is_binary(struct grep_source *gs);
> +
> +
>  static struct grep_pat *create_grep_pat(const char *pat, size_t patlen,
>  					const char *origin, int no,
>  					enum grep_pat_token t,
> @@ -403,7 +407,7 @@ static void dump_grep_expression_1(struct grep_expr *x, int in)
>  	}
>  }
>  
> -void dump_grep_expression(struct grep_opt *opt)
> +static void dump_grep_expression(struct grep_opt *opt)
>  {
>  	struct grep_expr *x = opt->pattern_expression;
>  
> diff --git a/grep.h b/grep.h
> index 00d71f7..8a28a67 100644
> --- a/grep.h
> +++ b/grep.h
> @@ -159,11 +159,10 @@ struct grep_source {
>  
>  void grep_source_init(struct grep_source *gs, enum grep_source_type type,
>  		      const char *name, const void *identifier);
> -int grep_source_load(struct grep_source *gs);
>  void grep_source_clear_data(struct grep_source *gs);
>  void grep_source_clear(struct grep_source *gs);
>  void grep_source_load_driver(struct grep_source *gs);
> -int grep_source_is_binary(struct grep_source *gs);
> +
>  
>  int grep_source(struct grep_opt *opt, struct grep_source *gs);
Heh, so I obviously didn't see this before sending the patch yesterday! :-D

Yes, this solves the problem addressed by yesterday's patch, so please ignore that. However, this tickles sparse to complain as well ... ;-)

New patch on it's way.

[I have a funny feeling that I'm about to download an email, in response to yesterday's patch, that says something like: "does commit 07a7d656 not fix it for you ..." :-P ]

ATB, Ramsay Jones

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 15 in “test-string-list.c: Fix some sparse warnings”
  1. test-string-list.c: Fix some sparse warningsRamsay Jones, Sep 15, 2012
  2. Junio C HamanoSep 15, 2012
  3. 1/7 builtin/notes.c: mark file-scope functions as staticJunio C Hamano, Sep 15, 2012
  4. 2/7 commit.c: mark file-scope functions as staticJunio C Hamano, Sep 15, 2012
  5. 3/7 diff.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  6. 4/7 graph.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  7. 5/7 grep.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  8. Ramsay JonesSep 19, 2012
  9. Junio C HamanoSep 19, 2012
  10. Ramsay JonesSep 20, 2012
  11. 6/7 rerere.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  12. 7/7 notes.c: mark private file-scope symbols as staticJunio C Hamano, Sep 15, 2012
  13. Michael HaggertySep 17, 2012
  14. Ramsay JonesSep 19, 2012
  15. Michael HaggertySep 20, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.