Commit 8a1e925d by nulltoken

Fix warnings

parent ac316e74
...@@ -426,7 +426,7 @@ int git_indexer_stream_add(git_indexer_stream *idx, const void *data, size_t siz ...@@ -426,7 +426,7 @@ int git_indexer_stream_add(git_indexer_stream *idx, const void *data, size_t siz
if (git_filebuf_write(&idx->pack_file, data, size) < 0) if (git_filebuf_write(&idx->pack_file, data, size) < 0)
return -1; return -1;
hash_partially(idx, data, size); hash_partially(idx, data, (int)size);
/* Make sure we set the new size of the pack */ /* Make sure we set the new size of the pack */
if (idx->opened_pack) { if (idx->opened_pack) {
......
...@@ -440,7 +440,7 @@ void clar__assert_equal_file( ...@@ -440,7 +440,7 @@ void clar__assert_equal_file(
int ignore_cr, int ignore_cr,
const char *path, const char *path,
const char *file, const char *file,
size_t line) int line)
{ {
char buf[4000]; char buf[4000];
ssize_t bytes, total_bytes = 0; ssize_t bytes, total_bytes = 0;
......
...@@ -44,7 +44,7 @@ GIT_INLINE(void) clar__assert_in_range( ...@@ -44,7 +44,7 @@ GIT_INLINE(void) clar__assert_in_range(
} }
#define cl_assert_equal_sz(sz1,sz2) do { \ #define cl_assert_equal_sz(sz1,sz2) do { \
size_t __sz1 = (sz1), __sz2 = (sz2); \ size_t __sz1 = (size_t)(sz1), __sz2 = (size_t)(sz2); \
clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, __sz1, __sz2); \ clar__assert_equal(__FILE__,__LINE__,#sz1 " != " #sz2, 1, "%"PRIuZ, __sz1, __sz2); \
} while (0) } while (0)
...@@ -52,10 +52,10 @@ GIT_INLINE(void) clar__assert_in_range( ...@@ -52,10 +52,10 @@ GIT_INLINE(void) clar__assert_in_range(
clar__assert_in_range((L),(V),(H),__FILE__,__LINE__,"Range check: " #V " in [" #L "," #H "]", 1) clar__assert_in_range((L),(V),(H),__FILE__,__LINE__,"Range check: " #V " in [" #L "," #H "]", 1)
#define cl_assert_equal_file(DATA,SIZE,PATH) \ #define cl_assert_equal_file(DATA,SIZE,PATH) \
clar__assert_equal_file(DATA,SIZE,0,PATH,__FILE__,__LINE__) clar__assert_equal_file(DATA,SIZE,0,PATH,__FILE__,(int)__LINE__)
#define cl_assert_equal_file_ignore_cr(DATA,SIZE,PATH) \ #define cl_assert_equal_file_ignore_cr(DATA,SIZE,PATH) \
clar__assert_equal_file(DATA,SIZE,1,PATH,__FILE__,__LINE__) clar__assert_equal_file(DATA,SIZE,1,PATH,__FILE__,(int)__LINE__)
void clar__assert_equal_file( void clar__assert_equal_file(
const char *expected_data, const char *expected_data,
...@@ -63,7 +63,7 @@ void clar__assert_equal_file( ...@@ -63,7 +63,7 @@ void clar__assert_equal_file(
int ignore_cr, int ignore_cr,
const char *path, const char *path,
const char *file, const char *file,
size_t line); int line);
/* /*
* Some utility macros for building long strings * Some utility macros for building long strings
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment