Jump to content

Compilation warnings


rmozel

Recommended Posts

Hi,

I am new to uGFX. Although the software running as expected, I get warning messages at the compilation step:

/Users/mbp/work/stm32/toolc/ugfx_2.5/src/gos/gos_x_threads.c:10:5: warning: "GOS_NEED_X_THREADS" is not defined [-Wundef]
 #if GOS_NEED_X_THREADS
     ^
/Users/mbp/work/stm32/toolc/ugfx_2.5/src/gos/gos_x_heap.c:10:5: warning: "GOS_NEED_X_HEAP" is not defined [-Wundef]
 #if GOS_NEED_X_HEAP
     ^
/Users/mbp/work/stm32/toolc/ugfx_2.5/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c: In function 'gdisp_lld_flush':
/Users/mbp/work/stm32/toolc/ugfx_2.5/drivers/gdisp/SSD1306/gdisp_lld_SSD1306.c:153:8: warning: "SSD1306_SH1106" is not defined [-Wundef]
    #if SSD1306_SH1106
        ^

The configuration is:

  • STM32F401RET Nucleo board
  • Adafruit 0.96 inch OLED display with SSD1306
  • STM32F401RE-Nucleo SSD1306 ChibiOS 1.0 example dated Feb 12, 2016
  • uGFX Library v2.5
  • ChibiOS/RT v16.1.4
  • GCC-ARM-Embedded 5 Q1 2016
  • Mac OS X 10.11.5

Thanks in advance.

Edited by rmozel
Typo
Link to comment
Share on other sites

It is interesting your compiler is complaining about that when it is defined in the c standards that an undefined macro is to be treated numericly as zero for expression evaluation (which in turn is evaluated as false). Thus your compiler is giving invalid warnings. 

Having said that, in ugfx we have tried to predefine each macro so in this case it means that either a) we have missed the predefinition of those two symbols, or b) there is something wrong with your compile setup.

We will check the code but if your compile is working you can certainly ignore those warnings (or turn them off with compiler flags).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...