diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-03-05 15:57:50 -0800 |
commit | 01569b8f5f2394c534c3aba7276caf22493fce82 (patch) | |
tree | 40d52cf2d4d76c1e1e5bf6443c34836627f4e5f9 /src/sat/satoko/utils | |
parent | b632c8496cc48bb8be0851ea2c183f94c201f791 (diff) | |
download | abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.gz abc-01569b8f5f2394c534c3aba7276caf22493fce82.tar.bz2 abc-01569b8f5f2394c534c3aba7276caf22493fce82.zip |
Fixing some warnings by adding cast from 'int' to 'size_t' in memset, memcpy, etc.
Diffstat (limited to 'src/sat/satoko/utils')
-rw-r--r-- | src/sat/satoko/utils/vec/vec_char.h | 4 | ||||
-rw-r--r-- | src/sat/satoko/utils/vec/vec_flt.h | 4 | ||||
-rwxr-xr-x | src/sat/satoko/utils/vec/vec_int.h | 4 | ||||
-rwxr-xr-x | src/sat/satoko/utils/vec/vec_sdbl.h | 4 | ||||
-rwxr-xr-x | src/sat/satoko/utils/vec/vec_uint.h | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/sat/satoko/utils/vec/vec_char.h b/src/sat/satoko/utils/vec/vec_char.h index 7d5732ec..4d780b22 100644 --- a/src/sat/satoko/utils/vec/vec_char.h +++ b/src/sat/satoko/utils/vec/vec_char.h @@ -233,10 +233,10 @@ static inline int vec_char_desc_compare(const void *p1, const void *p2) static inline void vec_char_sort(vec_char_t *p, int ascending) { if (ascending) - qsort((void *) p->data, p->size, sizeof(char), + qsort((void *) p->data, (size_t)p->size, sizeof(char), (int (*)(const void *, const void *)) vec_char_asc_compare); else - qsort((void*) p->data, p->size, sizeof(char), + qsort((void*) p->data, (size_t)p->size, sizeof(char), (int (*)(const void *, const void *)) vec_char_desc_compare); } diff --git a/src/sat/satoko/utils/vec/vec_flt.h b/src/sat/satoko/utils/vec/vec_flt.h index d7c896d9..8dd7b2ac 100644 --- a/src/sat/satoko/utils/vec/vec_flt.h +++ b/src/sat/satoko/utils/vec/vec_flt.h @@ -220,10 +220,10 @@ static inline int vec_flt_desc_compare(const void* p1, const void* p2) static inline void vec_flt_sort(vec_flt_t* p, int ascending) { if (ascending) - qsort((void *) p->data, p->size, sizeof(float), + qsort((void *) p->data, (size_t)p->size, sizeof(float), (int (*)(const void*, const void*)) vec_flt_asc_compare); else - qsort((void *) p->data, p->size, sizeof(float), + qsort((void *) p->data, (size_t)p->size, sizeof(float), (int (*)(const void*, const void*)) vec_flt_desc_compare); } diff --git a/src/sat/satoko/utils/vec/vec_int.h b/src/sat/satoko/utils/vec/vec_int.h index 75c5d134..d310fd45 100755 --- a/src/sat/satoko/utils/vec/vec_int.h +++ b/src/sat/satoko/utils/vec/vec_int.h @@ -214,10 +214,10 @@ static inline int vec_int_desc_compare(const void* p1, const void* p2) static inline void vec_int_sort(vec_int_t* p, int ascending) { if (ascending) - qsort((void *) p->data, p->size, sizeof(int), + qsort((void *) p->data, (size_t)p->size, sizeof(int), (int (*)(const void*, const void*)) vec_int_asc_compare); else - qsort((void *) p->data, p->size, sizeof(int), + qsort((void *) p->data, (size_t)p->size, sizeof(int), (int (*)(const void*, const void*)) vec_int_desc_compare); } diff --git a/src/sat/satoko/utils/vec/vec_sdbl.h b/src/sat/satoko/utils/vec/vec_sdbl.h index ec1c731c..89127412 100755 --- a/src/sat/satoko/utils/vec/vec_sdbl.h +++ b/src/sat/satoko/utils/vec/vec_sdbl.h @@ -227,10 +227,10 @@ static inline int vec_sdbl_desc_compare(const void* p1, const void* p2) static inline void vec_sdbl_sort(vec_sdbl_t* p, int ascending) { if (ascending) - qsort((void *) p->data, p->size, sizeof(sdbl_t), + qsort((void *) p->data, (size_t)p->size, sizeof(sdbl_t), (int (*)(const void*, const void*)) vec_sdbl_asc_compare); else - qsort((void *) p->data, p->size, sizeof(sdbl_t), + qsort((void *) p->data, (size_t)p->size, sizeof(sdbl_t), (int (*)(const void*, const void*)) vec_sdbl_desc_compare); } diff --git a/src/sat/satoko/utils/vec/vec_uint.h b/src/sat/satoko/utils/vec/vec_uint.h index e6719ca3..ef094236 100755 --- a/src/sat/satoko/utils/vec/vec_uint.h +++ b/src/sat/satoko/utils/vec/vec_uint.h @@ -242,10 +242,10 @@ static inline int vec_uint_desc_compare(const void *p1, const void *p2) static inline void vec_uint_sort(vec_uint_t *p, int ascending) { if (ascending) - qsort((void *) p->data, p->size, sizeof(unsigned), + qsort((void *) p->data, (size_t)p->size, sizeof(unsigned), (int (*)(const void *, const void *)) vec_uint_asc_compare); else - qsort((void*) p->data, p->size, sizeof(unsigned), + qsort((void*) p->data, (size_t)p->size, sizeof(unsigned), (int (*)(const void *, const void *)) vec_uint_desc_compare); } |