diff options
| author | Vicent Marti <tanoku@gmail.com> | 2010-11-23 14:36:31 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2010-11-24 00:23:15 +0200 |
| commit | 6b1eab3976b5b7cf4e65b9d12e5e25a98411c4da (patch) | |
| tree | 8601ed34eeb61accf4fa4f97c3de6a14e8b83fb6 /src | |
| parent | 5dc2bee1538ad5fc50abb8dd84fb9237f184a217 (diff) | |
| download | libgit2-6b1eab3976b5b7cf4e65b9d12e5e25a98411c4da.tar.gz | |
Fix MSVC warnings and errors
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/repository.c | 8 | ||||
| -rw-r--r-- | src/tag.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/repository.c b/src/repository.c index 5dd1fdf89..dbf3407db 100644 --- a/src/repository.c +++ b/src/repository.c @@ -212,7 +212,7 @@ static int source_resize(git_odb_source *src) size_t write_offset, new_size; void *new_data; - write_offset = src->write_ptr - src->raw.data; + write_offset = (size_t)((char *)src->write_ptr - (char *)src->raw.data); new_size = src->raw.len * 2; if ((new_data = git__malloc(new_size)) == NULL) @@ -223,7 +223,7 @@ static int source_resize(git_odb_source *src) src->raw.data = new_data; src->raw.len = new_size; - src->write_ptr = new_data + write_offset; + src->write_ptr = (char *)new_data + write_offset; return GIT_SUCCESS; } @@ -249,7 +249,7 @@ int git__source_printf(git_odb_source *source, const char *format, ...) if (did_resize) vsnprintf(source->write_ptr, source->raw.len - source->written_bytes, format, arglist); - source->write_ptr += len; + source->write_ptr = (char *)source->write_ptr + len; source->written_bytes += len; return GIT_SUCCESS; @@ -267,7 +267,7 @@ int git__source_write(git_odb_source *source, const void *bytes, size_t len) } memcpy(source->write_ptr, bytes, len); - source->write_ptr += len; + source->write_ptr = (char *)source->write_ptr + len; source->written_bytes += len; return GIT_SUCCESS; @@ -229,6 +229,6 @@ int git_tag__writeback(git_tag *tag, git_odb_source *src) int git_tag__parse(git_tag *tag) { assert(tag && tag->object.source.open); - return parse_tag_buffer(tag, tag->object.source.raw.data, tag->object.source.raw.data + tag->object.source.raw.len); + return parse_tag_buffer(tag, tag->object.source.raw.data, (char *)tag->object.source.raw.data + tag->object.source.raw.len); } |
