Ignore unused function and variable warning for mock file compilation.
Static function and variables are unused for mock files and hence
generate warnings. Hence, ignore only those warnings.
@@ -12,6 +12,7 @@ $(MOCK_DIR)/%_mock.c: $(abs_top_srcdir)/src/%.c
# For some reason, mock.o files are intermediate files sometimes.
# Mark them as secondary in order not to be deleted automatically.
.SECONDARY:
+$(MOCK_DIR)/%_mock.o: CFLAGS+= -Wno-unused-function -Wno-unused-variable
$(MOCK_DIR)/%_mock.o: $(MOCK_DIR)/%_mock.c
all: $(patsubst %,%.t,$(TARGETS))
