my_basic icon indicating copy to clipboard operation
my_basic copied to clipboard

mb_debug_count_stack_frames - undeclared 'l'

Open invpe opened this issue 2 years ago • 1 comments

Error when compiling with undefined MB_ENABLE_STACK_TRACE

my_basic.c:14689:14: error: 'l' undeclared (first use in this function)
  mb_unrefvar(l);
/* Get stack frame count of a MY-BASIC environment */
int mb_debug_count_stack_frames(struct mb_interpreter_t* s) {
#ifdef MB_ENABLE_STACK_TRACE
	int result = 0;

	if(!s) {
		goto _exit;
	}

	result = _ls_count(s->stack_frames);

_exit:
	return result;
#else /* MB_ENABLE_STACK_TRACE */
	int result = 0;
	mb_unrefvar(s);
	mb_unrefvar(l);

	return result;
#endif /* MB_ENABLE_STACK_TRACE */
}

invpe avatar Oct 19 '23 09:10 invpe

Afaik and usually s and l go in pairs which seem that function is missing.

struct mb_interpreter_t* s, void** l

blazer2k1 avatar Oct 21 '23 04:10 blazer2k1