mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 11:37:06 +08:00
[makefile] enable extra warnings and silence unusd in lisa/plug_sys
This commit is contained in:
+6
-4
@@ -80,17 +80,19 @@ CINCS = $(INCLUDES) -I$(SRC_ARCH)/include
|
||||
CFLAGS = $(CINCS)
|
||||
CFLAGS += -O$(OPT)
|
||||
# CFLAGS += -malignment-traps
|
||||
CFLAGS += -Wall -Wcast-qual -Wimplicit -Wcast-align
|
||||
CFLAGS += -Wpointer-arith -Wswitch
|
||||
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
|
||||
CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
|
||||
CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
CFLAGS += -finline-limit=1200 --param inline-unit-growth=100
|
||||
|
||||
# flags only for C
|
||||
# flags for warnings
|
||||
CFLAGS += -Wall -Wextra
|
||||
CFLAGS += -Wcast-qual -Wimplicit -Wcast-align
|
||||
CFLAGS += -Wpointer-arith -Wswitch
|
||||
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
|
||||
CFLAGS += -Wstrict-prototypes -Wmissing-declarations
|
||||
CFLAGS += -Wmissing-prototypes -Wnested-externs
|
||||
|
||||
CFLAGS += $(CSTANDARD)
|
||||
CFLAGS += $($(TARGET).CFLAGS) $(LOCAL_CFLAGS)
|
||||
|
||||
|
||||
+6
-2
@@ -98,7 +98,7 @@ $(info Using "$($(TARGET).LDSCRIPT)" as ldscript for target "$(TARGET)".)
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS = -I. -I./$(ARCH) -I../ext/libopencm3/include $(INCLUDES) -D__thumb2__ -Wall -msoft-float -O$(OPT)
|
||||
CFLAGS = -I. -I./$(ARCH) -I../ext/libopencm3/include $(INCLUDES) -D__thumb2__ -msoft-float -O$(OPT)
|
||||
CFLAGS += -Wl,--gc-sections
|
||||
CFLAGS += -mfix-cortex-m3-ldrd
|
||||
CFLAGS += -mcpu=$(MCU) -mthumb -ansi
|
||||
@@ -107,16 +107,20 @@ CFLAGS += -std=gnu99
|
||||
CFLAGS += -fno-common
|
||||
CFLAGS += -g$(DEBUG)
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
|
||||
# flags for warnings
|
||||
CFLAGS += -Wall -Wextra
|
||||
CFLAGS += -Wimplicit
|
||||
CFLAGS += -Wcast-align
|
||||
CFLAGS += -Wpointer-arith -Wswitch
|
||||
CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
|
||||
CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
|
||||
CFLAGS += -Wnested-externs
|
||||
CFLAGS += -Wmissing-prototypes
|
||||
CFLAGS += -Wstrict-prototypes
|
||||
CFLAGS += -Wmissing-declarations
|
||||
CFLAGS += -Wswitch-default
|
||||
|
||||
CFLAGS += -Wa,-adhlns=$(OBJDIR)/$(notdir $(subst $(suffix $<),.lst,$<))
|
||||
CFLAGS += -DSTM32F1
|
||||
|
||||
CFLAGS += $($(TARGET).CFLAGS)
|
||||
|
||||
@@ -14,11 +14,11 @@ extern ssize_t _write(int, const void *, size_t);
|
||||
extern int _close(int);
|
||||
extern ssize_t _read(int, void *, size_t);
|
||||
|
||||
off_t _lseek(int a, off_t b, int c) { return b;}
|
||||
off_t _lseek(int a __attribute__((unused)), off_t b, int c __attribute__((unused))) { return b;}
|
||||
void abort(void) {while(1){};}
|
||||
pid_t getpid(void) { return 0;}
|
||||
int kill(pid_t a, int b) {return 0;}
|
||||
void * _sbrk(int a) {return 0;}
|
||||
ssize_t _write(int a, const void *b, size_t c) {return 0; }
|
||||
int _close(int a) { return 0;}
|
||||
ssize_t _read(int a, void *b, size_t c) {return 0;}
|
||||
int kill(pid_t a __attribute__((unused)), int b __attribute__((unused))) {return 0;}
|
||||
void * _sbrk(int a __attribute__((unused))) {return 0;}
|
||||
ssize_t _write(int a __attribute__((unused)), const void *b __attribute__((unused)), size_t c __attribute__((unused))) {return 0; }
|
||||
int _close(int a __attribute__((unused))) { return 0;}
|
||||
ssize_t _read(int a __attribute__((unused)), void *b __attribute__((unused)), size_t c __attribute__((unused))) {return 0;}
|
||||
|
||||
Reference in New Issue
Block a user