From 077010481ad49742bb40c88676eab6510899b4c7 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Fri, 17 Oct 2008 21:07:41 +0200 Subject: [PATCH] remove nasty compiler warnings B.W. --- Patch: !op-not-func-in-Inst.patch Patch: !typed-Inst.patch --- op-not-func-in-Inst.patch | 16 +++++++++------- symbol-lookup.patch | 10 +++++----- typed-Inst.patch | 4 ++-- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/op-not-func-in-Inst.patch b/op-not-func-in-Inst.patch index c6da03d..42ec48f 100644 --- a/op-not-func-in-Inst.patch +++ b/op-not-func-in-Inst.patch @@ -1,8 +1,8 @@ --- - source/interpret.c | 242 +++++++++++++++++++++++++++++------------------------ + source/interpret.c | 244 +++++++++++++++++++++++++++++------------------------ source/interpret.h | 2 - 2 files changed, 137 insertions(+), 107 deletions(-) + 2 files changed, 139 insertions(+), 107 deletions(-) diff --quilt old/source/interpret.c new/source/interpret.c --- old/source/interpret.c @@ -177,7 +177,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c int args = inst[i+2].value; printd(" %s", inst[i+1].sym->name); if (args < 0) { -@@ -4421,81 +4442,90 @@ static void disasmInternal(Inst *inst, i +@@ -4421,81 +4442,92 @@ static void disasmInternal(Inst *inst, i } i += 2; } @@ -306,14 +306,13 @@ diff --quilt old/source/interpret.c new/source/interpret.c + printd(" nDim=%d", inst[i+1].value); + ++i; + break; - -- printd("\n"); ++ + case OP_ARRAY_REF_ASSIGN_SETUP: + printd(" binOp=%s nDim=%d", + inst[i+1].value ? "true" : "false", + inst[i+2].value); + i += 2; - break; ++ break; + + case OP_PUSH_ARRAY_SYM: + printd(" %s %s", @@ -321,7 +320,10 @@ diff --quilt old/source/interpret.c new/source/interpret.c + inst[i+2].value ? "createAndRef" : "refOnly"); + i += 2; + break; -+ + +- printd("\n"); ++ default: + break; } - } - if (j == N_OPS) { diff --git a/symbol-lookup.patch b/symbol-lookup.patch index 8d3f642..09b13b9 100644 --- a/symbol-lookup.patch +++ b/symbol-lookup.patch @@ -472,7 +472,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c break; default: -@@ -4809,11 +4718,6 @@ static void stackdumpframe(DataValue *ar +@@ -4811,11 +4720,6 @@ static void stackdumpframe(DataValue *ar DataValue *endDv = (arg1 > outpt) ? arg1 : outpt; int nArgs = FP_GET_ARG_COUNT(fp); @@ -484,7 +484,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c #ifdef DEBUG_STACK_HEADFIRST #else /* do caller's frame */ -@@ -4822,17 +4726,6 @@ static void stackdumpframe(DataValue *ar +@@ -4824,17 +4728,6 @@ static void stackdumpframe(DataValue *ar #endif /* #ifdef DEBUG_STACK_HEADFIRST */ /* do current frame */ @@ -502,7 +502,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c /* output instructions between endDv and sp - 1 inclusive */ #ifdef DEBUG_STACK_HEADFIRST -@@ -4843,7 +4736,6 @@ static void stackdumpframe(DataValue *ar +@@ -4845,7 +4738,6 @@ static void stackdumpframe(DataValue *ar #endif /* #ifdef DEBUG_STACK_HEADFIRST */ { const char *posFmt = "%-6s"; @@ -510,7 +510,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c char *pos = ""; char buffer[sizeof(STACK_DUMP_ARG_PREFIX) + TYPE_INT_STR_SIZE(int)]; -@@ -4867,10 +4759,6 @@ static void stackdumpframe(DataValue *ar +@@ -4869,10 +4761,6 @@ static void stackdumpframe(DataValue *ar sprintf(pos = buffer, STACK_DUMP_ARG_PREFIX "%d", offset + FP_TO_ARGS_DIST + nArgs + 1); } @@ -521,7 +521,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c else if (offset == 0) { pos = "FrameP"; } -@@ -4878,17 +4766,6 @@ static void stackdumpframe(DataValue *ar +@@ -4880,17 +4768,6 @@ static void stackdumpframe(DataValue *ar } printd(posFmt, pos); diff --git a/typed-Inst.patch b/typed-Inst.patch index dfab5e7..8ef0b5c 100644 --- a/typed-Inst.patch +++ b/typed-Inst.patch @@ -230,7 +230,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c #ifdef DEBUG_DISASSEMBLER /* For debugging code generation */ -static void disasmInternal(Inst *inst, int nInstr) -+static const int checkOperands(Inst *inst, int nopers, ...) ++static int checkOperands(Inst *inst, int nopers, ...) { - static const char *opNames[] = { + va_list args; @@ -522,7 +522,7 @@ diff --quilt old/source/interpret.c new/source/interpret.c i += 2; break; -@@ -4540,7 +4673,7 @@ static void disasmInternal(Inst *inst, i +@@ -4542,7 +4675,7 @@ static void disasmInternal(Inst *inst, i break; default: -- 2.11.4.GIT