use UNUSED macro
This commit is contained in:
parent
8ae55bd9b6
commit
173d4dcf07
|
@ -1495,6 +1495,8 @@ pic_set(pic_state *pic, const char *name, pic_value value)
|
|||
void
|
||||
print_code(pic_state *pic, struct pic_code c)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
printf("[%2d] ", c.insn);
|
||||
switch (c.insn) {
|
||||
case OP_POP:
|
||||
|
@ -1602,7 +1604,7 @@ print_code(pic_state *pic, struct pic_code c)
|
|||
void
|
||||
pic_dump_irep(pic_state *pic, struct pic_irep *irep)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
|
||||
printf("## irep %p\n", (void *)irep);
|
||||
printf("[clen = %zd, argc = %d, localc = %d]\n", irep->clen, irep->argc, irep->localc);
|
||||
|
|
|
@ -25,12 +25,15 @@ pic_error(pic_state *pic, const char *msg)
|
|||
void
|
||||
pic_errorf(pic_state *pic, const char *msg, size_t n, ...)
|
||||
{
|
||||
UNUSED(n);
|
||||
pic_error(pic, msg);
|
||||
}
|
||||
|
||||
void
|
||||
pic_abort(pic_state *pic, const char *msg)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
fprintf(stderr, "abort: %s\n", msg);
|
||||
fflush(stderr);
|
||||
abort();
|
||||
|
@ -39,6 +42,8 @@ pic_abort(pic_state *pic, const char *msg)
|
|||
void
|
||||
pic_warn(pic_state *pic, const char *msg)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
fprintf(stderr, "warn: %s\n", msg);
|
||||
}
|
||||
|
||||
|
|
2
src/gc.c
2
src/gc.c
|
@ -121,6 +121,8 @@ pic_calloc(pic_state *pic, size_t count, size_t size)
|
|||
void
|
||||
pic_free(pic_state *pic, void *ptr)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@ pic_cdr(pic_state *pic, pic_value obj)
|
|||
bool
|
||||
pic_list_p(pic_state *pic, pic_value obj)
|
||||
{
|
||||
UNUSED(pic);
|
||||
|
||||
while (pic_pair_p(obj)) {
|
||||
obj = pic_pair_ptr(obj)->cdr;
|
||||
}
|
||||
|
|
|
@ -50,6 +50,7 @@ pic_proc_cv_init(pic_state *pic, struct pic_proc *proc, size_t cv_size)
|
|||
int
|
||||
pic_proc_cv_size(pic_state *pic, struct pic_proc *proc)
|
||||
{
|
||||
UNUSED(pic);
|
||||
return proc->env ? proc->env->valuec : 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ pic_var_new(pic_state *pic, pic_value init, struct pic_proc *conv /* = NULL */)
|
|||
pic_value
|
||||
pic_var_ref(pic_state *pic, struct pic_var *var)
|
||||
{
|
||||
UNUSED(pic);
|
||||
return var->value;
|
||||
}
|
||||
|
||||
|
@ -42,6 +43,7 @@ pic_var_set(pic_state *pic, struct pic_var *var, pic_value value)
|
|||
void
|
||||
pic_var_set_force(pic_state *pic, struct pic_var *var, pic_value value)
|
||||
{
|
||||
UNUSED(pic);
|
||||
var->value = value;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ write_str(pic_state *pic, struct pic_string *str)
|
|||
size_t i;
|
||||
const char *cstr = str->str;
|
||||
|
||||
UNUSED(pic);
|
||||
|
||||
for (i = 0; i < str->len; ++i) {
|
||||
if (cstr[i] == '"' || cstr[i] == '\\') {
|
||||
putchar('\\');
|
||||
|
|
Loading…
Reference in New Issue