• Variable declared as static const is being discarded even when used
    Version: 7.3.1 Let's consider following example: static const uint32_t y = 5; void return_variable(uint32_t* val) { *val = y; } int main(void) { uint32_t x = 0; return_variable(&x); } I...
  • Variable declared as static const is being discarded even when used
    Version: 7.3.1 Let's consider following example: static const uint32_t y = 5; void return_variable(uint32_t* val) { *val = y; } int main(void) { uint32_t x = 0; return_variable(&x); } I...
  • Warning when declaring variable: 'Variable not used'
    I'm trying to initialize I2C peripherals on my STM32 Discovery board and this is the function I've created to do so - void I2C2_Initialize(void) { NVIC_InitTypeDef NVIC_InitStructure; I2C_InitTypeDef...
  • Warning when declaring variable: 'Variable not used'
    I'm trying to initialize I2C peripherals on my STM32 Discovery board and this is the function I've created to do so - void I2C2_Initialize(void) { NVIC_InitTypeDef NVIC_InitStructure; I2C_InitTypeDef...
  • Static declaration error
    Code: static unsigned int timer[num_timers]; Error: TIMER_MODULE.C(6): error C221: non-constant case/dim expression An error has been generated while declaring an array in static. Or else...