Author Topic: How to fix Stack Usage Warnings  (Read 1493 times)

0 Members and 1 Guest are viewing this topic.

Offline Red_MicroTopic starter

  • Regular Contributor
  • *
  • Posts: 121
  • Country: ca
How to fix Stack Usage Warnings
« on: October 19, 2021, 03:13:30 am »
I'm using IAR Workbench to program STM32. My application uses USB. I'm getting the following warning when compiling:

Warning[Ls016]: [stack usage analysis] the program contains at least one indirect call. Example: from "USB_Exc". A complete list of such functions is in the map file.   

When I go to the map file, I can see the list of functions that perform unknown indirect calls.

Are these warnings serious? Would they cause issues if I ignore them?

 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11251
  • Country: us
    • Personal site
Re: How to fix Stack Usage Warnings
« Reply #1 on: October 19, 2021, 03:23:30 am »
It looks like a warning from a static code analyzer complaining that it can't analyze code with indirect/pointer calls. This is not a serious warning, there is nothing wrong with the code itself and you can ignore it.

If you write code that code analyzers like, your code would suck for humans to read.
Alex
 
The following users thanked this post: Red_Micro


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf