Skip to content

Commit

Permalink
remove 2 set but unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed Apr 24, 2013
1 parent 059ef54 commit c50a8f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 3 additions & 7 deletions core/callcc.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//
// callcc.c
// creation and calling of continuations
///\file callcc.c
/// creation and calling of continuations, in non-portable asm, x86 only yet
//
// NOTE: these hacks make use of the frame pointer, so they must
// be compiled -fno-omit-frame-pointer!
Expand Down Expand Up @@ -30,7 +29,6 @@ PN potion_continuation_yield(Potion *P, PN cl, PN self) {

//
// move stack pointer, fill in stack, resume
//
cc->stack[3] = (PN)cc;
#if POTION_X86 == POTION_JIT_TARGET
#if __WORDSIZE == 64
Expand Down Expand Up @@ -89,17 +87,15 @@ ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
PN potion_callcc(Potion *P, PN cl, PN self) {
struct PNCont *cc;
PN_SIZE n;
PN *start, *end, *sp1 = P->mem->cstack, *sp2, *sp3;
PN *start, *sp1 = P->mem->cstack, *sp2, *sp3;
POTION_ESP(&sp2);
POTION_EBP(&sp3);
#if POTION_STACK_DIR > 0
n = sp2 - sp1;
start = sp1;
end = sp2;
#else
n = sp1 - sp2 + 1;
start = sp2;
end = sp1;
#endif

cc = PN_ALLOC_N(PN_TCONT, struct PNCont, sizeof(PN) * (n + 3 + PN_SAVED_REGS));
Expand Down
3 changes: 1 addition & 2 deletions test/api/gc-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ void gc_test_alloc4(CuTest *T) {
}

void gc_test_forward(CuTest *T) {
PN_SIZE count;
char *fj = "frances johnson.";
vPN(Data) ptr = potion_data_alloc(P, 16);
register unsigned long old = (PN)ptr & 0xFFFF;
memcpy(ptr->data, fj, 16);

count = potion_mark_stack(P, 1);
potion_mark_stack(P, 1);
CuAssert(T, "copied location identical to original", (old & 0xFFFF) != (PN)ptr);
CuAssertIntEquals(T, "copied object not still PN_TUSER", ptr->vt, PN_TUSER);
CuAssert(T, "copied data not identical to original",
Expand Down

0 comments on commit c50a8f0

Please sign in to comment.