avoid compiler warnings

This commit is contained in:
Matthew Flatt 2014-03-26 12:14:22 -06:00
parent cdce954128
commit 6af65ee19a
10 changed files with 27 additions and 6 deletions

View File

@ -30,7 +30,7 @@
***********************************************************************/
#ifndef __lightning_asm_common_h
#ifndef __lightning_asm_common_h_
#define __lightning_asm_common_h_
#if 1

View File

@ -29,7 +29,7 @@
*
***********************************************************************/
#ifndef __lightning_core_common_h
#ifndef __lightning_core_common_h_
#define __lightning_core_common_h_
#define JIT_NOREG (-1)

View File

@ -30,7 +30,7 @@
***********************************************************************/
#ifndef __lightning_asm_common_h
#ifndef __lightning_asm_common_h_
#define __lightning_asm_common_h_
#ifndef _ASM_SAFETY

View File

@ -30,7 +30,7 @@
***********************************************************************/
#ifndef __lightning_core_common_h
#ifndef __lightning_core_common_h_
#define __lightning_core_common_h_
/* jit_code: could be a union of many possible function

View File

@ -472,11 +472,18 @@ struct jit_local_state {
#define jit_arg_l() (_jitl.nextarg_geti++)
#define jit_arg_p() (_jitl.nextarg_geti++)
#define jit_arg_reg(p) (jit_arg_reg_order[p])
# ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-const-variable"
# endif
# ifdef _WIN64
static const int jit_arg_reg_order[] = { _ECX, _EDX, JIT_R(8), JIT_R(9) };
# else
static const int jit_arg_reg_order[] = { _EDI, _ESI, _EDX, _ECX };
# endif
# ifdef __clang__
# pragma clang diagnostic pop
# endif
#else
#define jit_arg_c() ((_jitl.framesize += sizeof(int)) - sizeof(int))
#define jit_arg_uc() ((_jitl.framesize += sizeof(int)) - sizeof(int))

View File

@ -30,7 +30,7 @@
***********************************************************************/
#ifndef __lightning_asm_common_h
#ifndef __lightning_asm_common_h_
#define __lightning_asm_common_h_

View File

@ -30,7 +30,7 @@
***********************************************************************/
#ifndef __lightning_core_common_h
#ifndef __lightning_core_common_h_
#define __lightning_core_common_h_
/* jit_code: union of many possible function pointer types. Returned

View File

@ -85,6 +85,11 @@ int mzrt_sema_destroy(mzrt_sema *sema);
/****************** Compare and Swap *******************************/
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-function"
#endif
#define mz_CAS_T uintptr_t
#ifdef SIXTY_FOUR_BIT_INTEGERS
# define mz_CAS_64
@ -121,6 +126,11 @@ static MZ_INLINE void mzrt_ensure_max_cas(uintptr_t *atomic_val, uintptr_t len)
}
}
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
#endif
#endif

View File

@ -228,10 +228,12 @@ static MZ_INLINE rettype name ## __big_dbl(const Scheme_Object *n1, const Scheme
static MZ_INLINE rettype name ## __big_rat(const Scheme_Object *n1, const Scheme_Object *n2) { \
return rop(scheme_integer_to_rational(n1), (n2)); \
} \
complexwrap(\
static MZ_INLINE rettype name ## __big_comp(const Scheme_Object *n1, const Scheme_Object *n2) { \
Small_Complex sc; \
return cxop((scheme_make_small_complex(n1, &sc)), (n2)); \
} \
) \
static MZ_INLINE rettype name ## __rat_int(const Scheme_Object *n1, const Scheme_Object *n2) { \
Small_Rational sr8; \
check_exact_zero2(n2, n1); \

View File

@ -2360,6 +2360,7 @@ static MZ_INLINE rxpos l_strchr_ci(char *str, rxpos a, int l, int c)
return -1;
}
#if 0
static MZ_INLINE int in_ranges(char *str, rxpos a, int l, int c)
{
int i;
@ -2389,6 +2390,7 @@ static MZ_INLINE int in_ranges_ci(char *str, rxpos a, int l, int c)
return 0;
}
#endif
/*
* regexec and friends