From 0f23ef8e4f6ce49f3797115aa7987478479a1820 Mon Sep 17 00:00:00 2001 From: jeefo Date: Sat, 21 Sep 2019 23:32:49 +0300 Subject: [PATCH] Fix for debug-build. --- include/crlib/cr-alloc.h | 2 +- project/makefile | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/crlib/cr-alloc.h b/include/crlib/cr-alloc.h index 2693596..ff5cabf 100644 --- a/include/crlib/cr-alloc.h +++ b/include/crlib/cr-alloc.h @@ -32,7 +32,7 @@ public: // calloc on linux with debug enabled doesn't always zero out memory #if defined (CR_DEBUG) && !defined (CR_WINDOWS) - plat.bzero (ptr); + plat.bzero (ptr, length); #endif return ptr; } diff --git a/project/makefile b/project/makefile index 38d5c00..59160e8 100644 --- a/project/makefile +++ b/project/makefile @@ -10,7 +10,7 @@ PROJECT = yapb SOURCES = ../source OBJECTS = $(wildcard $(SOURCES)/*.cpp) -COMPILER_FLAGS = -std=c++11 -m32 -Wall -Wextra -Werror -fno-exceptions -fno-rtti +COMPILER_FLAGS = -std=c++11 -m32 -Wall -Wextra -Werror -fno-exceptions -fno-rtti -pedantic LINKER_FLAGS = -m32 -ldl ifeq "$(DEBUG)" "true" @@ -53,8 +53,8 @@ ifeq ($(findstring clang,$(COMPILER)),clang) else ifeq ($(findstring gcc,$(COMPILER)),gcc) ifneq "$(OSX)" "false" ifneq "$(DEBUG)" "true" - LINKER_FLAGS += -Wl,--no-undefined -flto=thin - COMPILER_FLAGS += -funroll-all-loops -flto=thin + LINKER_FLAGS += -Wl,--no-undefined + COMPILER_FLAGS += -funroll-all-loops endif endif else ifeq ($(findstring icc,$(COMPILER)),icc)