diff options
author | Vicent Marti <vicent@github.com> | 2014-02-24 23:01:01 +0100 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-02-24 23:01:01 +0100 |
commit | 98b9366212ac6670bd5f90e70400e7cf09aea16a (patch) | |
tree | 877c8843afa41166e9d69a4a9ba04e4ab8d18ec2 /src | |
parent | f3e44dd64ca7b7e4640d816e389faa583c7b4fec (diff) | |
parent | c8893d1f00a7897c6fada3ecc21eabe5c1af9cb0 (diff) | |
download | libgit2-98b9366212ac6670bd5f90e70400e7cf09aea16a.tar.gz |
Merge pull request #2134 from libgit2/ben/icc
Fix Intel compiler warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/diff_tform.c | 4 | ||||
-rw-r--r-- | src/index.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/diff_tform.c b/src/diff_tform.c index dfb59a3f8..97fbc2883 100644 --- a/src/diff_tform.c +++ b/src/diff_tform.c @@ -218,7 +218,7 @@ int git_diff_merge(git_diff *onto, const git_diff *from) int git_diff_find_similar__hashsig_for_file( void **out, const git_diff_file *f, const char *path, void *p) { - git_hashsig_option_t opt = (git_hashsig_option_t)p; + git_hashsig_option_t opt = (git_hashsig_option_t)(intptr_t)p; int error = 0; GIT_UNUSED(f); @@ -235,7 +235,7 @@ int git_diff_find_similar__hashsig_for_file( int git_diff_find_similar__hashsig_for_buf( void **out, const git_diff_file *f, const char *buf, size_t len, void *p) { - git_hashsig_option_t opt = (git_hashsig_option_t)p; + git_hashsig_option_t opt = (git_hashsig_option_t)(intptr_t)p; int error = 0; GIT_UNUSED(f); diff --git a/src/index.c b/src/index.c index e0c0022e1..2de3dfebb 100644 --- a/src/index.c +++ b/src/index.c @@ -2046,13 +2046,15 @@ static int write_index(git_index *index, git_filebuf *file) git_oid hash_final; struct index_header header; bool is_extended; + uint32_t index_version_number; assert(index && file); is_extended = is_index_extended(index); + index_version_number = is_extended ? INDEX_VERSION_NUMBER_EXT : INDEX_VERSION_NUMBER; header.signature = htonl(INDEX_HEADER_SIG); - header.version = htonl(is_extended ? INDEX_VERSION_NUMBER_EXT : INDEX_VERSION_NUMBER); + header.version = htonl(index_version_number); header.entry_count = htonl((uint32_t)index->entries.length); if (git_filebuf_write(file, &header, sizeof(struct index_header)) < 0) |