how to fix the compiling warning of "function does return"?

cancel
Showing results for 
Search instead for 
Did you mean: 

how to fix the compiling warning of "function does return"?

Jump to solution
182 Views
xuedongyang
Contributor II

xuedongyang_0-1650915617537.png

Hi, NXP experts,

I observed compiling warnings "function does return". Any idea why we got the warnings and how to fix it?

Thanks,

Xuedong Yang

0 Kudos
1 Solution
112 Views
kef2
Senior Contributor IV

Pretty simple one. You claim your function doesn't return __noreturn, and function actually returns. No forever loop inside. Either add for(;;){} at the end or remove __noreturn.

View solution in original post

0 Kudos
4 Replies
113 Views
kef2
Senior Contributor IV

Pretty simple one. You claim your function doesn't return __noreturn, and function actually returns. No forever loop inside. Either add for(;;){} at the end or remove __noreturn.

0 Kudos
102 Views
xuedongyang
Contributor II

Thank you very much, for the suggestion.

0 Kudos
123 Views
xuedongyang
Contributor II

Hi, Yiping,

Sorry for late response. 

The version of CW I am using is 10.3.1. Here is the screen shot for the version and project. Yes, I am using NXP's project. I have not changed the linker file. Please let me know if you need more information.

Thanks.

Xuedong

xuedongyang_0-1652923250169.png

 

0 Kudos
162 Views
yipingwang
NXP TechSupport
NXP TechSupport

Can you give me the version of the CodeWarrior you are using? Do you use the project NXP sent to you? Please give more details about the project.
Have you changed the file size and linker file? From the warning, I am more worry about the _memset16 cannot be reached than "function does return"

0 Kudos