From aef668040ba81231aaaccc0dba278a474bceb330 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 21 Oct 2019 09:26:14 -0400 Subject: [PATCH 1/2] Set core name with strcpy() instead of assignment. Signed-off-by: Michal Mielewczyk --- example/simple/src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/simple/src/main.c b/example/simple/src/main.c index 8024ccf..ef059fd 100644 --- a/example/simple/src/main.c +++ b/example/simple/src/main.c @@ -207,7 +207,7 @@ int initialize_core(ocf_cache_t cache, ocf_core_t *core) /* Core configuration */ ocf_mngt_core_config_set_default(&core_cfg); - core_cfg.name = "core1"; + strcpy(core_cfg.name, "core1"); core_cfg.volume_type = VOL_TYPE; ret = ocf_uuid_set_str(&core_cfg.uuid, "core"); if (ret) From 3fda55867ad5ab0623f71fbf08ccc4789889d738 Mon Sep 17 00:00:00 2001 From: Michal Mielewczyk Date: Mon, 21 Oct 2019 09:27:16 -0400 Subject: [PATCH 2/2] Pass linker flags as the last part of gcc command. Signed-off-by: Michal Mielewczyk --- example/simple/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/simple/Makefile b/example/simple/Makefile index c775ec1..f19cae0 100644 --- a/example/simple/Makefile +++ b/example/simple/Makefile @@ -19,7 +19,7 @@ all: sync $(MAKE) $(PROGRAM) $(PROGRAM): $(OBJS) - $(CC) $(LDFLAGS) -o $@ $^ + $(CC) -o $@ $^ $(LDFLAGS) sync: @$(MAKE) -C ${OCFDIR} inc O=$(PWD)