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

2012-09-20 Thread Ramsay Jones
Junio C Hamano wrote:
> Ramsay Jones  writes:
> 
>> 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.
> 
> Are you sure the patch you are responding to really "tickles
> sparse"?

Yes.

> You have another grep.c patch timestamped two minutes after the
> message I am responding to, and as far as I can see, it is a subset
> of the patch you are responding to with the message I am responding
> to.

Hmm, that sentence has too many twists for me! :-D

Let me see if I can clear up the misunderstanding:

- the "patch from yesterday" (18-09-2021) fixed a complaint from
  sparse regarding symbol 'dump_grep_expression'. This was before
  I had seen this patch email, or the resulting commit 07a7d656.
  Since my "patch from yesterday" is a strict subset of your patch,
  then your patch also fixes the complaint from sparse regarding
  the 'dump_grep_expression' symbol.

- this patch (commit 07a7d656) causes sparse to complain about the
  symbols 'grep_source_load' and 'grep_source_is_binary'. The new
  patch from me ("timestamped two minutes after ...") also titled
  "grep.c: Fix some sparse warnings" on 19-09-2012 at 7:04 PM, is
  *not* a subset of commit 07a7d656. This patch addresses the new
  sparse warnings regarding 'grep_source_load' and
  'grep_source_is_binary'.

Hopefully that addresses the confusion! ;-)

HTH

ATB,
Ramsay Jones



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-09-19 Thread Junio C Hamano
Ramsay Jones  writes:

> 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.

Are you sure the patch you are responding to really "tickles
sparse"?

You have another grep.c patch timestamped two minutes after the
message I am responding to, and as far as I can see, it is a subset
of the patch you are responding to with the message I am responding
to.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-09-19 Thread Ramsay Jones
Junio C Hamano wrote:
> Signed-off-by: Junio C Hamano 
> ---
>  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


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-09-15 Thread Junio C Hamano
Signed-off-by: Junio C Hamano 
---
 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);
 
-- 
1.7.12.508.g4d78187

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html