From 3a1c431011229fe641a23c129cfafa462558a03f Mon Sep 17 00:00:00 2001 From: nulltoken Date: Tue, 24 May 2011 18:55:35 +0200 Subject: [PATCH] Fix compilation warnings in MSVC This allows to successfully build libgit2 with waf on Windows. --- src/config_file.c | 4 ++-- src/util.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config_file.c b/src/config_file.c index 1ee9afa28..ace7cc8ff 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -638,7 +638,7 @@ static int parse_section_header_ext(const char *line, const char *base_name, cha break; } - subsection[pos++] = c; + subsection[pos++] = (char) c; } while ((c = line[rpos++]) != ']'); subsection[pos] = '\0'; @@ -719,7 +719,7 @@ static int parse_section_header(diskfile_backend *cfg, char **section_out) goto error; } - name[name_length++] = tolower(c); + name[name_length++] = (char) tolower(c); } while ((c = line[pos++]) != ']'); diff --git a/src/util.c b/src/util.c index b271fa8df..ebc1f43d5 100644 --- a/src/util.c +++ b/src/util.c @@ -109,7 +109,7 @@ void git__strntolower(char *str, int len) int i; for (i = 0; i < len; ++i) { - str[i] = tolower(str[i]); + str[i] = (char) tolower(str[i]); } }