Removing warnings reported by Travis Cross.

This commit is contained in:
Alex Shinn 2012-01-04 15:59:28 +09:00
parent 944561b4da
commit 7479b9775b
2 changed files with 7 additions and 3 deletions

7
gc.c
View file

@ -435,7 +435,12 @@ void sexp_mark_global_symbols(sexp ctx) {
#endif
sexp sexp_gc (sexp ctx, size_t *sum_freed) {
sexp res, finalized;
sexp res;
#ifdef __GNUC__
sexp finalized __attribute__((unused));
#else
sexp finalized;
#endif
sexp_debug_printf("%p (heap: %p size: %lu)", ctx, sexp_context_heap(ctx),
sexp_heap_total_size(sexp_context_heap(ctx)));
sexp_mark_global_symbols(ctx);

3
sexp.c
View file

@ -65,7 +65,7 @@ sexp sexp_alloc_tagged_aux(sexp ctx, size_t size, sexp_uint_t tag sexp_current_s
#if SEXP_USE_OBJECT_BRACE_LITERALS
sexp sexp_write_simple_object (sexp ctx, sexp self, sexp_sint_t n, sexp obj, sexp writer, sexp out) {
sexp t, x, *elts;
sexp t, x;
sexp_gc_var1(args);
sexp_sint_t i, len, nulls=0;
i = sexp_pointer_tag(obj);
@ -84,7 +84,6 @@ sexp sexp_write_simple_object (sexp ctx, sexp self, sexp_sint_t n, sexp obj, sex
sexp_write(ctx, sexp_make_fixnum(sexp_type_tag(t)), out);
}
len = sexp_type_num_slots_of_object(t, obj);
elts = (sexp*) (((char*)obj) + sexp_type_field_base(t));
args = sexp_list1(ctx, SEXP_FALSE);
for (i=0; i<len; i++) {
x = sexp_slot_ref(obj, i);