From: fennecdjay Date: Sun, 10 Mar 2019 16:19:12 +0000 (+0100) Subject: :shirt: Clean X-Git-Tag: nightly~2753^2~10 X-Git-Url: http://10.11.0.4:5575/?a=commitdiff_plain;h=9d37eef29b3c906885fd2348b75e80ee8e9687a7;p=gwion.git :shirt: Clean --- diff --git a/config.mk.orig b/config.mk.orig index ec1a3640..aa91a378 100644 --- a/config.mk.orig +++ b/config.mk.orig @@ -1,33 +1,15 @@ # handle base options PRG ?=gwion -CC ?=gcc -YACC ?=yacc -LEX ?=flex PREFIX ?=/usr/local -SOUNDPIPE_LIB ?=-lsoundpipe -SOUNDPIPE_INC ?= -LDFLAGS += -lm -ldl -rdynamic -lpthread -CFLAGS += -Iinclude -Iutil/include -Iast/include -std=c99 -D_GNU_SOURCE -CFLAGS += -mtune=native -#-O3 -mfpmath=sse -mtune=native -fstrict-aliasing -#CFLAGS += -Iinclude -std=c99 -m32 -fstrict-aliasing -D_GNU_SOURCE -# compiler warnings -#CFLAGS += -Wall -Wextra -#-pedantic -#CFLAGS += -fPIC +LDFLAGS += -lm -ldl +CFLAGS += -Iinclude -Iutil/include -Iast/include -D_GNU_SOURCE # handle boolean options -USE_DOUBLE = 0 -USE_COVERAGE ?= 0 USE_OPTIMIZE ?= 0 USE_VMBENCH ?= 0 USE_NOMEMOIZE ?= 0 -# handle definitions -D_FUNC ?= dummy_driver # base plugin directories GWPLUG_DIR ?= $(shell echo ~/.gwplug) DEBUG_STACK ?= 0 -#COLOR ?= 1 -#CFLAGS+= -DCOLOR diff --git a/src/emit/emit.c b/src/emit/emit.c index fe808ee0..a2ab4dac 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -717,7 +717,7 @@ static inline m_bool push_func_code(const Emitter emit, const Func f) { size_t len = strlen(f->name); size_t sz = len - strlen(f->value_ref->owner_class->name); char c[sz + 1]; - strncpy(c, f->name, sz); + memcpy(c, f->name, sz); c[sz] = '\0'; struct dottmpl_ *dt = mp_alloc(dottmpl); dt->name = s_name(insert_symbol(c)); diff --git a/src/vm/vm.c b/src/vm/vm.c index b2c5b1d6..2f4a59b2 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -729,9 +729,8 @@ gcadd: vector_add(&shred->gc, *(vtype*)(reg-SZ_INT)); DISPATCH(); gcend: - while((a.obj = (M_Object)vector_pop(&shred->gc))) { + while((a.obj = (M_Object)vector_pop(&shred->gc))) _release(a.obj, shred); - } DISPATCH() gack: gack(reg, instr);