Skip to content

Commit 3debb9e

Browse files
authored
Merge pull request #77 from jajanusz/test-flags-fix-warnings
test: fix CFLAGS and LDFLAGS warnings
2 parents a48cedd + de100b7 commit 3debb9e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

test/cmocka/Makefile.am

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ if BUILD_XTENSA
66
LOG_COMPILER = xt-run
77
endif
88

9-
AM_CFLAGS = \
9+
override AM_CFLAGS := \
10+
$(filter-out -nostdlib,$(AM_CFLAGS)) \
1011
$(SOF_INCDIR)
1112

12-
AM_LDFLAGS =
13+
override AM_LDFLAGS := \
14+
$(filter-out -nostdlib,$(AM_LDFLAGS))
1315

1416
if HAVE_CMOCKA_PREFIX
1517
AM_CFLAGS += -I$(CMOCKA_PREFIX)/include
@@ -26,9 +28,6 @@ if BUILD_HOST
2628
AM_CFLAGS += -I../../src/arch/host/include
2729
endif
2830

29-
CFLAGS := $(filter-out -nostdlib,$(CFLAGS))
30-
LDFLAGS := $(filter-out -nostdlib,$(LDFLAGS))
31-
3231
LDADD = -lcmocka
3332

3433
# memory allocator test

test/cmocka/src/lib/alloc/mock.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* POSSIBILITY OF SUCH DAMAGE.
2727
*
2828
* Author: Slawomir Blauciak <[email protected]>
29+
* Janusz Jankowski <[email protected]>
2930
*/
3031

3132
#include <stdint.h>
@@ -38,11 +39,13 @@ struct dma_sg_config;
3839
int dma_copy_from_host(struct dma_copy *dc, struct dma_sg_config *host_sg,
3940
int32_t host_offset, void *local_ptr, int32_t size)
4041
{
42+
return 0;
4143
}
4244

4345
int dma_copy_to_host(struct dma_copy *dc, struct dma_sg_config *host_sg,
4446
int32_t host_offset, void *local_ptr, int32_t size)
4547
{
48+
return 0;
4649
}
4750

4851
void _trace_event_mbox_atomic(uint32_t e)

0 commit comments

Comments
 (0)