ref: 39e4d953fd4bf40977fa2e4305b92149693edac8
parent: 3e55de64ebd376a181a315f67427893c8a137bec
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Mon Nov 30 07:50:04 EST 2020
fix more warnings
--- a/flisp.c
+++ b/flisp.c
@@ -811,7 +811,7 @@
static value_t do_trycatch(void)
{
uint32_t saveSP = SP;
- value_t v;
+ value_t v = NIL;
value_t thunk = Stack[SP-2];
Stack[SP-2] = Stack[SP-1];
Stack[SP-1] = thunk;
@@ -839,7 +839,7 @@
{
uint32_t extr = nopt+nkw;
uint32_t ntot = nreq+extr;
- value_t args[64], v;
+ value_t args[64], v = NIL;
uint32_t i, a = 0, nrestargs;
value_t s1 = Stack[SP-1];
value_t s2 = Stack[SP-2];
@@ -950,7 +950,7 @@
VM_APPLY_LABELS;
uint32_t top_frame = curr_frame;
// frame variables
- uint32_t n=0, captured;
+ uint32_t n, captured;
uint32_t bp;
const uint8_t *ip;
fixnum_t s, hi;
@@ -1833,6 +1833,7 @@
switch (op) {
case OP_ARGC:
n = *ip++;
+ USED(n);
break;
case OP_VARGC:
n = *ip++;
@@ -1841,6 +1842,7 @@
case OP_LARGC:
if (bswap) SWAP_INT32(ip);
n = GET_INT32(ip); ip+=4;
+ USED(n);
break;
case OP_LVARGC:
if (bswap) SWAP_INT32(ip);
@@ -1859,6 +1861,7 @@
i = GET_INT32(ip); ip+=4;
if (bswap) SWAP_INT32(ip);
n = GET_INT32(ip); ip+=4;
+ USED(n);
if (bswap) SWAP_INT32(ip);
n = abs(GET_INT32(ip)); ip+=4;
sp += (n-i);
@@ -2162,7 +2165,7 @@
value_t fl_stacktrace(value_t *args, u_int32_t nargs)
{
- (void)args;
+ USED(args);
argcount("stacktrace", nargs, 0);
return _stacktrace(fl_throwing_frame ? fl_throwing_frame : curr_frame);
}
@@ -2317,7 +2320,6 @@
set(printlevelsym=symbol("*print-level*"), FL_F);
builtins_table_sym = symbol("*builtins*");
fl_lasterror = NIL;
- i = 0;
for (i=OP_EQ; i <= OP_ASET; i++) {
setc(symbol(builtin_names[i]), builtin(i));
}
--- a/iostream.c
+++ b/iostream.c
@@ -19,7 +19,7 @@
void print_iostream(value_t v, ios_t *f)
{
- (void)v;
+ USED(v);
fl_print_str("#<io stream>", f);
}
@@ -54,7 +54,7 @@
value_t fl_eof_object(value_t *args, uint32_t nargs)
{
- (void)args;
+ USED(args);
argcount("eof-object", nargs, 0);
return FL_EOF;
}
@@ -102,7 +102,7 @@
value_t fl_buffer(value_t *args, u_int32_t nargs)
{
argcount("buffer", nargs, 0);
- (void)args;
+ USED(args);
value_t f = cvalue(iostreamtype, sizeof(ios_t));
ios_t *s = value2c(ios_t*, f);
if (ios_mem(s, 0) == NULL)