diff options
| author | Pierre-Olivier Latour <pol@mac.com> | 2015-06-15 09:52:40 -0700 |
|---|---|---|
| committer | Pierre-Olivier Latour <pol@mac.com> | 2015-06-15 09:55:12 -0700 |
| commit | 0f4d9c03676f4226f6af705ae3ad06fcc5a82eb5 (patch) | |
| tree | 7f88a390ac9618be23afb462deb0153302b186f5 /src | |
| parent | f621f087b2cb6f124a64a57ce2e0113dc92d53bb (diff) | |
| download | libgit2-0f4d9c03676f4226f6af705ae3ad06fcc5a82eb5.tar.gz | |
Fixed Xcode 6.1 build warnings
Diffstat (limited to 'src')
| -rw-r--r-- | src/diff_patch.c | 2 | ||||
| -rw-r--r-- | src/diff_print.c | 1 | ||||
| -rw-r--r-- | src/path.c | 4 | ||||
| -rw-r--r-- | src/refs.c | 2 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/diff_patch.c b/src/diff_patch.c index 63253c2c5..60648f8d7 100644 --- a/src/diff_patch.c +++ b/src/diff_patch.c @@ -285,7 +285,7 @@ done: static int diff_binary(git_diff_output *output, git_patch *patch) { - git_diff_binary binary = { 0 }; + git_diff_binary binary = {{0}}; const char *old_data = patch->ofile.map.data; const char *new_data = patch->nfile.map.data; size_t old_len = patch->ofile.map.len, diff --git a/src/diff_print.c b/src/diff_print.c index ebae4ea75..c58698368 100644 --- a/src/diff_print.c +++ b/src/diff_print.c @@ -335,7 +335,6 @@ static int format_binary( const char *typename = type == GIT_DIFF_BINARY_DELTA ? "delta" : "literal"; const char *scan, *end; - int error = 0; git_buf_printf(pi->buf, "%s %lu\n", typename, inflatedlen); pi->line.num_lines++; diff --git a/src/path.c b/src/path.c index aca85f992..c04b50622 100644 --- a/src/path.c +++ b/src/path.c @@ -1045,7 +1045,7 @@ int git_path_direach( #endif while ((de = readdir(dir)) != NULL) { - char *de_path = de->d_name; + const char *de_path = de->d_name; size_t de_len = strlen(de_path); if (git_path_is_dot_or_dotdot(de_path)) @@ -1305,7 +1305,7 @@ int git_path_diriter_next(git_path_diriter *diriter) #ifdef GIT_USE_ICONV if ((diriter->flags & GIT_PATH_DIR_PRECOMPOSE_UNICODE) != 0 && - (error = git_path_iconv(&diriter->ic, (char **)&filename, &filename_len)) < 0) + (error = git_path_iconv(&diriter->ic, &filename, &filename_len)) < 0) return error; #endif diff --git a/src/refs.c b/src/refs.c index ff5e24067..7b538659d 100644 --- a/src/refs.c +++ b/src/refs.c @@ -863,7 +863,7 @@ int git_reference__normalize_name( const char *name, unsigned int flags) { - char *current; + const char *current; int segment_len, segments_count = 0, error = GIT_EINVALIDSPEC; unsigned int process_flags; bool normalize = (buf != NULL); |
