Skip to content

Commit

Permalink
convert.c: Fix return type of git_path_check_eol()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Ramsay Jones authored and gitster committed Nov 21, 2011
1 parent e4ac953 commit ef563de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert.c
Expand Up @@ -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;

Expand Down

0 comments on commit ef563de

Please sign in to comment.