Skip to content

Commit

Permalink
Remove build warnings #7
Browse files Browse the repository at this point in the history
Signed-off-by: Szczepan Zalega <szczepan@nitrokey.com>
  • Loading branch information
szszszsz committed May 19, 2018
1 parent 247ae48 commit 4f63bf0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions build/gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ endif
CFLAGS = -g$(DEBUG)
CFLAGS += $(CDEFS) $(CINCS)
CFLAGS += -O$(OPT)
CFLAGS += -Wall -Wcast-align -Wimplicit -Werror
CFLAGS_OUR_SRC += -Werror
CFLAGS += -Wall -Wcast-align -Wimplicit
CFLAGS += -Wpointer-arith -Wswitch
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
Expand All @@ -243,7 +244,7 @@ CONLYFLAGS += $(CSTANDARD)
ifneq ($(AT91LIBNOWARN),yes)
#AT91-lib warnings with:
CFLAGS += -Wcast-qual
CONLYFLAGS += -Wmissing-prototypes
CONLYFLAGS += -Wmissing-prototypes
CONLYFLAGS += -Wstrict-prototypes
CONLYFLAGS += -Wmissing-declarations
endif
Expand Down Expand Up @@ -491,10 +492,11 @@ endif
# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)

# Compile: create object files from C source files. ARM/Thumb
# Use CFLAGS_OUR_SRC flags only for our source code (all except located in Libraries dir)
$(COBJ) : %.o : %.c
@echo
@echo $(MSG_COMPILING) $<
$(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
$(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) `echo "$<" | grep -q Libraries || echo "${CFLAGS_OUR_SRC}"` $< -o $@

# Compile: create object files from C source files. ARM-only
$(COBJARM) : %.o : %.c
Expand Down
5 changes: 2 additions & 3 deletions src/ccid/CcidLocalAccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,10 +1087,9 @@ unsigned int nRet;
return (FALSE);
}

#ifdef COMPILE_TESTS
//FIXME correct naming
uint8_t testScAesKey (int nLen, unsigned char* pcKey)
{
//function unused in NK Pro
int nRet;

unsigned char acBufferOut[32];
Expand All @@ -1110,6 +1109,7 @@ unsigned char acBufferOut[32];
return (FALSE);
}

//FIXME correct naming
uint8_t testSendUserPW2 (unsigned char* pcPW)
{
unsigned short nRet;
Expand All @@ -1126,4 +1126,3 @@ uint8_t testSendUserPW2 (unsigned char* pcPW)
return (FALSE);
}

#endif //COMPILE_TESTS

0 comments on commit 4f63bf0

Please sign in to comment.