STM32CubeH7 icon indicating copy to clipboard operation
STM32CubeH7 copied to clipboard

Fix compiler warnings under -Wswitch-enum

Open radioflash opened this issue 3 years ago • 2 comments

By being explicit about cases that are treated as "default" in switch statements.

This does not change behavior at all, it only silences compiler warnings that may be very helpful in spotting programmer mistakes elsewhere.

Also added some comments about why those cases are handled as default/error.

(I did sign the CLA already)

radioflash avatar Jan 21 '22 10:01 radioflash

Hi @radioflash,

Thank you for this pull-request. We will get back to you with a feedback as soon as possible. Please excuse the delay it may take us sometimes to reply. Thank you for your comprehension.

With regards,

ALABSTM avatar Jan 30 '22 08:01 ALABSTM

ST Internal Reference: 122349

ASELSTM avatar Feb 07 '22 17:02 ASELSTM

Hi @radioflash,

I hope you are fine. Thank you again for this proposal. However, we cannot accept it.

  • Indeed, this would add more size to the code.
  • Moreover, it is specified in the release note of the STM32CubeH7 firmware that the supported mode is the "AC5-like warnings", as shown on the screenshot below.

image

In this case, please allow me to close this pull-request. Thank you for your comprehension and thank you again for your proposal.

With regards,

ALABSTM avatar Oct 26 '23 14:10 ALABSTM