{"thread":{"id":"28995","subject":"[PATCH] convert.c: Fix return type of git_path_check_eol()","startedAt":"2011-11-21T18:42:09Z","lastAt":"2011-11-22T02:03:30Z","messageCount":2,"participants":["Ramsay Jones","Ramkumar Ramachandra"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"179795","messageId":"4ECA9B81.9070101@ramsay1.demon.co.uk","threadId":"28995","inReplyTo":null,"subject":"[PATCH] convert.c: Fix return type of git_path_check_eol()","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2011-11-21T18:42:09Z","receivedAt":"2011-11-21T18:42:09Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe git_path_check_eol() function converts a string value to the\ncorresponding 'enum eol' value. However, the function is currently\ndeclared to return an 'enum crlf_action', which causes sparse to\ncomplain thus:\n\n        SP convert.c\n    convert.c:736:50: warning: mixing different enum types\n    convert.c:736:50:     int enum crlf_action  versus\n    convert.c:736:50:     int enum eol\n\nIn order to suppress the warning, we simply correct the return type\nin the function declaration.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n convert.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/convert.c b/convert.c\nindex 038b0be..86e9c29 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -658,7 +658,7 @@ static enum crlf_action git_path_check_crlf(const char *path, struct git_attr_ch\n \treturn CRLF_GUESS;\n }\n \n-static enum crlf_action git_path_check_eol(const char *path, struct git_attr_check *check)\n+static enum eol git_path_check_eol(const char *path, struct git_attr_check *check)\n {\n \tconst char *value = check->value;\n \n-- \n1.7.7\n"},{"id":"179813","messageId":"CALkWK0=XMOivrQDkoCCBPNJ1JWnCJiGmDVmjGZHZz+X2C1P07A@mail.gmail.com","threadId":"28995","inReplyTo":"4ECA9B81.9070101@ramsay1.demon.co.uk","subject":"Re: [PATCH] convert.c: Fix return type of git_path_check_eol()","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2011-11-22T02:03:30Z","receivedAt":"2011-11-22T02:03:30Z","isPatch":true,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi Ramsay,\n\nRamsay Jones wrote:\n> [...]\n> diff --git a/convert.c b/convert.c\n> index 038b0be..86e9c29 100644\n> --- a/convert.c\n> +++ b/convert.c\n> @@ -658,7 +658,7 @@ static enum crlf_action git_path_check_crlf(const char *path, struct git_attr_ch\n>        return CRLF_GUESS;\n>  }\n>\n> -static enum crlf_action git_path_check_eol(const char *path, struct git_attr_check *check)\n> +static enum eol git_path_check_eol(const char *path, struct git_attr_check *check)\n>  {\n>        const char *value = check->value;\n>\n\nLooks good.  Thanks.\n\n-- Ram\n"}]}