From 53ec5b1c332e82ff730579799cd4705805f6787c Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Thu, 22 Nov 2018 08:13:30 +0000 Subject: [PATCH] removed redundant code --- moo/lib/gc.c | 2 -- moo/lib/pf-utf8.c | 5 +---- moo/lib/std.c | 1 + 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/moo/lib/gc.c b/moo/lib/gc.c index 107b964..4d03608 100644 --- a/moo/lib/gc.c +++ b/moo/lib/gc.c @@ -539,7 +539,6 @@ static int ignite_3 (moo_t* moo) moo_oow_t i; moo_oop_t sym; moo_oop_class_t cls; - moo_oop_t* moo_ptr; for (i = 0; i < MOO_COUNTOF(kernel_classes); i++) { @@ -551,7 +550,6 @@ static int ignite_3 (moo_t* moo) cls->nsup = moo->sysdic; if (!moo_putatsysdic(moo, sym, (moo_oop_t)cls)) return -1; - moo_ptr++; } /* Attach the system dictionary to the nsdic field of the System class */ diff --git a/moo/lib/pf-utf8.c b/moo/lib/pf-utf8.c index 1ece9ea..fc16d67 100644 --- a/moo/lib/pf-utf8.c +++ b/moo/lib/pf-utf8.c @@ -43,16 +43,13 @@ moo_pfrc_t moo_pf_utf8_seqlen (moo_t* moo, moo_mod_t* mod, moo_ooi_t nargs) utf8 = (const moo_bch_t*)MOO_OBJ_GET_BYTE_SLOT(rcv); size = MOO_OBJ_GET_SIZE(rcv); - -#if 0 - /* TODO: check the first byte and return bytes required */ +/* TODO: do i need to check the first byte and return bytes required regardless of the available length? */ if ((n = moo_utf8_to_uc(utf8, size, &uch)) == 0) { /* invalid sequence */ moo_seterrnum (moo, MOO_EECERR); return MOO_PF_FAILURE; } -#endif MOO_STACK_SETRET (moo, nargs, MOO_SMOOI_TO_OOP(n)); return MOO_PF_SUCCESS; diff --git a/moo/lib/std.c b/moo/lib/std.c index 7b230a6..06bc1af 100644 --- a/moo/lib/std.c +++ b/moo/lib/std.c @@ -2793,6 +2793,7 @@ static DWORD WINAPI msw_wait_for_timer_event (LPVOID ctx) msw_tick_done = 0; /*ExitThread (0);*/ + return 0; } static MOO_INLINE void start_ticker (void)