* [PATCH] convert.c: Fix return type of git_path_check_eol()
@ 2011-11-21 18:42 Ramsay Jones
2011-11-22 2:03 ` Ramkumar Ramachandra
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2011-11-21 18:42 UTC (permalink / raw)
To: Junio C Hamano; +Cc: artagnon, GIT Mailing-list
The git_path_check_eol() function converts a string value to the
corresponding 'enum eol' value. However, the function is currently
declared to return an 'enum crlf_action', which causes sparse to
complain thus:
SP convert.c
convert.c:736:50: warning: mixing different enum types
convert.c:736:50: int enum crlf_action versus
convert.c:736:50: int enum eol
In order to suppress the warning, we simply correct the return type
in the function declaration.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
convert.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/convert.c b/convert.c
index 038b0be..86e9c29 100644
--- a/convert.c
+++ b/convert.c
@@ -658,7 +658,7 @@ static enum crlf_action git_path_check_crlf(const char *path, struct git_attr_ch
return CRLF_GUESS;
}
-static enum crlf_action git_path_check_eol(const char *path, struct git_attr_check *check)
+static enum eol git_path_check_eol(const char *path, struct git_attr_check *check)
{
const char *value = check->value;
--
1.7.7
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] convert.c: Fix return type of git_path_check_eol()
2011-11-21 18:42 [PATCH] convert.c: Fix return type of git_path_check_eol() Ramsay Jones
@ 2011-11-22 2:03 ` Ramkumar Ramachandra
0 siblings, 0 replies; 2+ messages in thread
From: Ramkumar Ramachandra @ 2011-11-22 2:03 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Junio C Hamano, GIT Mailing-list
Hi Ramsay,
Ramsay Jones wrote:
> [...]
> diff --git a/convert.c b/convert.c
> index 038b0be..86e9c29 100644
> --- a/convert.c
> +++ b/convert.c
> @@ -658,7 +658,7 @@ static enum crlf_action git_path_check_crlf(const char *path, struct git_attr_ch
> return CRLF_GUESS;
> }
>
> -static enum crlf_action git_path_check_eol(const char *path, struct git_attr_check *check)
> +static enum eol git_path_check_eol(const char *path, struct git_attr_check *check)
> {
> const char *value = check->value;
>
Looks good. Thanks.
-- Ram
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-22 2:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 18:42 [PATCH] convert.c: Fix return type of git_path_check_eol() Ramsay Jones
2011-11-22 2:03 ` Ramkumar Ramachandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox