diff options
| author | Sebastian Schuberth <sschuberth@gmail.com> | 2011-09-08 14:21:17 +0200 |
|---|---|---|
| committer | Sebastian Schuberth <sschuberth@gmail.com> | 2011-09-08 17:07:37 +0200 |
| commit | 26e74c6acedaec5c76944ac1f1a0f9215f23737f (patch) | |
| tree | 2fe1169f6f54edec0b968d1c515251ac346578eb /src/config_file.c | |
| parent | 564f0f7be1d962fdb3bdc42e7e47db9c1ce960ec (diff) | |
| download | libgit2-26e74c6acedaec5c76944ac1f1a0f9215f23737f.tar.gz | |
Fix some random size_t vs. int conversion warnings
Diffstat (limited to 'src/config_file.c')
| -rw-r--r-- | src/config_file.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/config_file.c b/src/config_file.c index 520a806b5..4e5dd0bb4 100644 --- a/src/config_file.c +++ b/src/config_file.c @@ -135,7 +135,7 @@ static int cvar_match_section(const char *local, const char *input) { char *first_dot; char *local_sp = strchr(local, ' '); - int comparison_len; + size_t comparison_len; /* * If the local section name doesn't contain a space, then we can @@ -198,7 +198,8 @@ static int cvar_normalize_name(cvar_t *var, char **output) { char *section_sp = strchr(var->section, ' '); char *quote, *name; - int len, ret; + size_t len; + int ret; /* * The final string is going to be at most one char longer than @@ -245,7 +246,7 @@ static int cvar_normalize_name(cvar_t *var, char **output) static char *interiorize_section(const char *orig) { char *dot, *last_dot, *section, *ret; - int len; + size_t len; dot = strchr(orig, '.'); last_dot = strrchr(orig, '.'); @@ -530,7 +531,7 @@ static char *cfg_readline(diskfile_backend *cfg) { char *line = NULL; char *line_src, *line_end; - int line_len; + size_t line_len; line_src = cfg->reader.read_ptr; @@ -600,7 +601,8 @@ GIT_INLINE(int) config_keychar(int c) static int parse_section_header_ext(const char *line, const char *base_name, char **section_name) { - int buf_len, total_len, pos, rpos; + size_t buf_len, total_len; + int pos, rpos; int c, ret; char *subsection, *first_quote, *last_quote; int error = GIT_SUCCESS; @@ -1100,7 +1102,8 @@ static int is_multiline_var(const char *str) static int parse_multiline_variable(diskfile_backend *cfg, const char *first, char **out) { char *line = NULL, *end; - int error = GIT_SUCCESS, len, ret; + int error = GIT_SUCCESS, ret; + size_t len; char *buf; /* Check that the next line exists */ |
