From 620771c83ec67c7f066d366acbc2efdfa75e7d14 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 15 Nov 2011 22:29:36 +0530 Subject: http: remove unused function hex() Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- http.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/http.c b/http.c index 008ad72ae..e6c75976e 100644 --- a/http.c +++ b/http.c @@ -747,14 +747,6 @@ static inline int needs_quote(int ch) return 1; } -static inline int hex(int v) -{ - if (v < 10) - return '0' + v; - else - return 'A' + v - 10; -} - static char *quote_ref_url(const char *base, const char *ref) { struct strbuf buf = STRBUF_INIT; -- cgit v1.2.1 From 7356b51e4bd07893256d76468d301dc244f4299d Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 15 Nov 2011 22:29:37 +0530 Subject: convert: don't mix enum with int Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- convert.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/convert.c b/convert.c index 3bb5a4dd5..038b0be61 100644 --- a/convert.c +++ b/convert.c @@ -641,7 +641,7 @@ static int ident_to_worktree(const char *path, const char *src, size_t len, return 1; } -static int git_path_check_crlf(const char *path, struct git_attr_check *check) +static enum crlf_action git_path_check_crlf(const char *path, struct git_attr_check *check) { const char *value = check->value; @@ -658,7 +658,7 @@ static int git_path_check_crlf(const char *path, struct git_attr_check *check) return CRLF_GUESS; } -static int git_path_check_eol(const char *path, struct git_attr_check *check) +static enum crlf_action git_path_check_eol(const char *path, struct git_attr_check *check) { const char *value = check->value; @@ -811,7 +811,7 @@ int renormalize_buffer(const char *path, const char *src, size_t len, struct str src = dst->buf; len = dst->len; } - return ret | convert_to_git(path, src, len, dst, 0); + return ret | convert_to_git(path, src, len, dst, SAFE_CRLF_FALSE); } /***************************************************************** -- cgit v1.2.1 From 5e12e78e52b4219ce27c14404351648fd47854cc Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 15 Nov 2011 22:29:39 +0530 Subject: sha1_file: don't mix enum with int Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- sha1_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sha1_file.c b/sha1_file.c index 27f3b9b27..6dcae3882 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2616,7 +2616,7 @@ static int index_mem(unsigned char *sha1, void *buf, size_t size, if ((type == OBJ_BLOB) && path) { struct strbuf nbuf = STRBUF_INIT; if (convert_to_git(path, buf, size, &nbuf, - write_object ? safe_crlf : 0)) { + write_object ? safe_crlf : SAFE_CRLF_FALSE)) { buf = strbuf_detach(&nbuf, &size); re_allocated = 1; } -- cgit v1.2.1 From e4ac953b2a1e33fedf210ac59394db480a6ade33 Mon Sep 17 00:00:00 2001 From: Ramkumar Ramachandra Date: Tue, 15 Nov 2011 23:01:09 +0530 Subject: git-compat-util: don't assume value for undefined variable Suggested-by: Thomas Rast Signed-off-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- git-compat-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-compat-util.h b/git-compat-util.h index 5ef8ff76f..8b4dd5c02 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -219,7 +219,7 @@ extern char *gitbasename(char *); #define find_last_dir_sep(path) strrchr(path, '/') #endif -#if __HP_cc >= 61000 +#if defined(__HP_cc) && (__HP_cc >= 61000) #define NORETURN __attribute__((noreturn)) #define NORETURN_PTR #elif defined(__GNUC__) && !defined(NO_NORETURN) -- cgit v1.2.1