suikan4github / murasaki

STM32 HAL class library
MIT License
17 stars 3 forks source link

Unnessary "volatile" causes warning at build time. #150

Closed suikan4github closed 1 year ago

suikan4github commented 1 year ago

Describe the bug "volatile" in line 525 of the murasaki_callback.cpp causes a warning. https://github.com/suikan4github/murasaki/blob/84f391b99617027151565349012e5fc367da857e/Src/murasaki_callback.cpp#L525

To Reproduce Just build-all. You will see the error message. The entire message in the text is :

../murasaki/core/murasaki_callback.cpp:525:7: warning: 'asm' qualifier 'volatile' ignored outside of function body
  525 | __asm volatile (
      |       ^~~~~~~~

Expected behavior The warning should be printed.

Screenshots If applicable, add screenshots to help explain your problem. Screenshot from 2023-05-07 10-41-54

Additional context This code is located outside of the C/C++ function. This is an inserted asm function. So, we may not need "volatile".

suikan4github commented 1 year ago

Merged to develop. Ready to release.