fix clang warnings
This commit is contained in:
parent
59c353962a
commit
09e1972fed
12
stb.h
12
stb.h
@ -2973,8 +2973,8 @@ typedef struct
|
|||||||
#define stb_arr_check(a) assert(!a || stb_arrhead(a)->signature == stb_arr_signature)
|
#define stb_arr_check(a) assert(!a || stb_arrhead(a)->signature == stb_arr_signature)
|
||||||
#define stb_arr_check2(a) assert(!a || stb_arrhead2(a)->signature == stb_arr_signature)
|
#define stb_arr_check2(a) assert(!a || stb_arrhead2(a)->signature == stb_arr_signature)
|
||||||
#else
|
#else
|
||||||
#define stb_arr_check(a) 0
|
#define stb_arr_check(a) ((void) 0)
|
||||||
#define stb_arr_check2(a) 0
|
#define stb_arr_check2(a) ((void) 0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ARRAY LENGTH
|
// ARRAY LENGTH
|
||||||
@ -3297,7 +3297,7 @@ unsigned int stb_hashptr(void *p)
|
|||||||
|
|
||||||
unsigned int stb_rehash_improved(unsigned int v)
|
unsigned int stb_rehash_improved(unsigned int v)
|
||||||
{
|
{
|
||||||
return stb_hashptr((void *) v);
|
return stb_hashptr((void *)(size_t) v);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int stb_hash2(char *str, unsigned int *hash2_ptr)
|
unsigned int stb_hash2(char *str, unsigned int *hash2_ptr)
|
||||||
@ -10407,15 +10407,15 @@ int stb_compress_intofile(FILE *f, char *input, unsigned int length)
|
|||||||
////////////////////// streaming I/O version /////////////////////
|
////////////////////// streaming I/O version /////////////////////
|
||||||
|
|
||||||
|
|
||||||
static stb_uint stb_out_backpatch_id(void)
|
static size_t stb_out_backpatch_id(void)
|
||||||
{
|
{
|
||||||
if (stb__out)
|
if (stb__out)
|
||||||
return (stb_uint) stb__out;
|
return (size_t) stb__out;
|
||||||
else
|
else
|
||||||
return ftell(stb__outfile);
|
return ftell(stb__outfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void stb_out_backpatch(stb_uint id, stb_uint value)
|
static void stb_out_backpatch(size_t id, stb_uint value)
|
||||||
{
|
{
|
||||||
stb_uchar data[4] = { value >> 24, value >> 16, value >> 8, value };
|
stb_uchar data[4] = { value >> 24, value >> 16, value >> 8, value };
|
||||||
if (stb__out) {
|
if (stb__out) {
|
||||||
|
Loading…
Reference in New Issue
Block a user