diff --git a/libraries/AP_Common/Arduino.mk b/libraries/AP_Common/Arduino.mk index 148889e4c5..9a22d83da1 100644 --- a/libraries/AP_Common/Arduino.mk +++ b/libraries/AP_Common/Arduino.mk @@ -411,11 +411,11 @@ $(BUILDROOT)/libraries/%.o: $(ARDUINO)/libraries/%.S # $(BUILDROOT)/$(HARDWARE)/%.o: $(CORESRC_DIR)/%.cpp $(RULEHDR) - $(v)$(CXX) $(CXXFLAGS) -c -o $@ $< -I$(CORESRC_DIR) + $(v)$(CXX) $(filter-out -W%,$(CXXFLAGS)) -c -o $@ $< -I$(CORESRC_DIR) $(BUILDROOT)/$(HARDWARE)/%.o: $(CORESRC_DIR)/%.c @mkdir -p $(dir $@) - $(v)$(CC) $(CFLAGS) -c -o $@ $< -I$(CORESRC_DIR) + $(v)$(CC) $(filter-out -W%,$(CFLAGS)) -c -o $@ $< -I$(CORESRC_DIR) $(BUILDROOT)/$(HARDWARE)/%.o: $(CORESRC_DIR)/%.S $(RULEHDR)