From 67d2c3ef256914dcce239eba3d613397b966cae1 Mon Sep 17 00:00:00 2001 From: blckmn Date: Sun, 2 Jul 2017 06:55:14 +1000 Subject: [PATCH] Minor makefile change to support windows better Removed uninitialised warnings --- Makefile | 8 +++----- src/main/cms/cms.c | 2 +- src/main/fc/cli.c | 2 +- src/main/io/asyncfatfs/asyncfatfs.c | 4 ++-- src/main/rx/spektrum.c | 2 +- src/main/sensors/acceleration.c | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index ebf1d2189..64c788fba 100644 --- a/Makefile +++ b/Makefile @@ -1345,22 +1345,20 @@ targets-group-rest: $(GROUP_OTHER_TARGETS) $(VALID_TARGETS): - $(V0) echo "" && \ + $(V0) @echo "" && \ echo "Building $@" && \ time $(MAKE) binary hex TARGET=$@ && \ echo "Building $@ succeeded." - - CLEAN_TARGETS = $(addprefix clean_,$(VALID_TARGETS) ) TARGETS_CLEAN = $(addsuffix _clean,$(VALID_TARGETS) ) ## clean : clean up temporary / machine-generated files clean: - $(V0) echo "Cleaning $(TARGET)" + $(V0) @echo "Cleaning $(TARGET)" $(V0) rm -f $(CLEAN_ARTIFACTS) $(V0) rm -rf $(OBJECT_DIR)/$(TARGET) - $(V0) echo "Cleaning $(TARGET) succeeded." + $(V0) @echo "Cleaning $(TARGET) succeeded." ## clean_test : clean up temporary / machine-generated files (tests) clean_test: diff --git a/src/main/cms/cms.c b/src/main/cms/cms.c index fc8eb1249..6df56ffef 100644 --- a/src/main/cms/cms.c +++ b/src/main/cms/cms.c @@ -872,7 +872,7 @@ STATIC_UNIT_TESTED uint16_t cmsHandleKey(displayPort_t *pDisplay, uint8_t key) uint16_t cmsHandleKeyWithRepeat(displayPort_t *pDisplay, uint8_t key, int repeatCount) { - uint16_t ret; + uint16_t ret = 0; for (int i = 0 ; i < repeatCount ; i++) { ret = cmsHandleKey(pDisplay, key); diff --git a/src/main/fc/cli.c b/src/main/fc/cli.c index cd055811b..d5d0db1b0 100755 --- a/src/main/fc/cli.c +++ b/src/main/fc/cli.c @@ -1164,7 +1164,7 @@ static void cliRxRange(char *cmdline) ptr = cmdline; i = atoi(ptr); if (i >= 0 && i < NON_AUX_CHANNEL_COUNT) { - int rangeMin, rangeMax; + int rangeMin = 0, rangeMax = 0; ptr = nextArg(ptr); if (ptr) { diff --git a/src/main/io/asyncfatfs/asyncfatfs.c b/src/main/io/asyncfatfs/asyncfatfs.c index 040a2e584..d3c926929 100644 --- a/src/main/io/asyncfatfs/asyncfatfs.c +++ b/src/main/io/asyncfatfs/asyncfatfs.c @@ -1639,7 +1639,7 @@ static afatfsOperationStatus_e afatfs_appendSuperclusterContinue(afatfsFile_t *f { afatfsAppendSupercluster_t *opState = &file->operation.state.appendSupercluster; - afatfsOperationStatus_e status; + afatfsOperationStatus_e status = AFATFS_OPERATION_FAILURE; doMore: switch (opState->phase) { @@ -2387,7 +2387,7 @@ static afatfsFilePtr_t afatfs_allocateFileHandle() static afatfsOperationStatus_e afatfs_ftruncateContinue(afatfsFilePtr_t file, bool markDeleted) { afatfsTruncateFile_t *opState = &file->operation.state.truncateFile; - afatfsOperationStatus_e status; + afatfsOperationStatus_e status = AFATFS_OPERATION_FAILURE; #ifdef AFATFS_USE_FREEFILE uint32_t oldFreeFileStart, freeFileGrow; diff --git a/src/main/rx/spektrum.c b/src/main/rx/spektrum.c index f73e2f2a8..a3a176373 100644 --- a/src/main/rx/spektrum.c +++ b/src/main/rx/spektrum.c @@ -212,7 +212,7 @@ void spektrumBind(rxConfig_t *rxConfig) } // Determine a pin to use - ioTag_t bindPin; + ioTag_t bindPin = IO_TAG_NONE; if (rxConfig->spektrum_bind_pin_override_ioTag) { bindPin = rxConfig->spektrum_bind_pin_override_ioTag; diff --git a/src/main/sensors/acceleration.c b/src/main/sensors/acceleration.c index 5f173eaf8..10c164d15 100644 --- a/src/main/sensors/acceleration.c +++ b/src/main/sensors/acceleration.c @@ -120,7 +120,7 @@ void pgResetFn_accelerometerConfig(accelerometerConfig_t *instance) bool accDetect(accDev_t *dev, accelerationSensor_e accHardwareToUse) { - accelerationSensor_e accHardware; + accelerationSensor_e accHardware = ACC_NONE; #ifdef USE_ACC_ADXL345 drv_adxl345_config_t acc_params; -- 2.11.4.GIT