Skip to content

Issue 44 fix warnings #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Jun 29, 2017
Merged

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jun 29, 2017

All warnings (~200) linked to the core are fixed.
Still few warnings linked to HAL source files (less than a dozen) which will be corrected thanks to HAL update.

fpistm added 16 commits June 29, 2017 08:18
Fix stm32duino#44
cores/arduino/stm32/PinNamesTypes.h:132:44: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
 #define STM_VALID_PINNAME(X) ((STM_PORT(X) >= FirstPort) && (STM_PORT(X) <= LastPort))

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/syscalls_stm32.c:45:0: warning: "UNUSED" redefined
 #define UNUSED(x) x ## _UNUSED __attribute__((__unused__))

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/WInterrupts.c:30:12: warning: comparison between pointer and integer
   if (port == NC)

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/wiring_digital.c:37:8: warning: implicit declaration of function 'is_pin_configured' [-Wimplicit-function-declaration]
     if(is_pin_configured(p, g_anOutputPinConfigured)) {

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/stm32/timer.c:733:19: warning: 'uwTimclock' may be used uninitialized in this function [-Wmaybe-uninitialized]
         uwTimclock*=2;

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/wiring_digital.c:90:1: warning: control reaches end of non-void function [-Wreturn-type]
 }

Signed-off-by: Frederic.Pillon <[email protected]>
Clean comment

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
Handle minimum field width of the output string
width is signed value, negative for left adjustment.
Range -128,127

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
syscalls_stm32.c:118:20: warning: pointer targets in passing argument 1 of 'uart_debug_write' differ in signedness [-Wpointer-sign]
   uart_debug_write(ptr, len);

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44
cores/arduino/stm32/analog.c:723:40: warning: 'return' with a value, in function returning void
   if (timHandle.Instance == NC) return 0;

Signed-off-by: Frederic.Pillon <[email protected]>
… cast

Fix stm32duino#44
cores/arduino/stm32/PortNames.c:38:22: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
             gpioPort = GPIOA_BASE;

Signed-off-by: Frederic.Pillon <[email protected]>
…ut a cast

Fix stm32duino#44
Using a uint32_t was a legacy from mbed pinmap feature.
This allow to be compatible with high leve api common to all mbed target.
There is not reason to keep it for Arduino.
Peripheral(SPIx, DACx, TIMx,...) is a pointer so manage it as it is to avoid
cast.

system/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f429xx.h:1245:29: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
 #define ADC1                ((ADC_TypeDef *) ADC1_BASE)

                              ^
/local/data/work/stm32/stm32duino/arduino-1.8.3/hardware/STM32/stm32/variants/NUCLEO_F429ZI/PeripheralPins.c:41:13: note: in expansion of macro 'ADC1'
     {PA0,   ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0 - PA0/WKUP
             ^~~~
...

Signed-off-by: Frederic.Pillon <[email protected]>
Fix stm32duino#44

Signed-off-by: Frederic.Pillon <[email protected]>
@fpistm fpistm merged commit acc0be3 into stm32duino:master Jun 29, 2017
@fpistm fpistm deleted the issue_44_fix_warnings branch August 7, 2017 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant