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

[PATCH] convert.c: Fix return type of git_path_check_eol()

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Nov 21, 2011, 18:42 UTC
Message-ID
<4ECA9B81.9070101@ramsay1.demon.co.uk>

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
Next: Ramkumar Ramachandra
Message 1 of 2 in “convert.c: Fix return type of git_path_check_eol()”
  1. convert.c: Fix return type of git_path_check_eol()Ramsay Jones, Nov 21, 2011
  2. Ramkumar RamachandraNov 22, 2011

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.