| ||||||||
Technical Support Support Resources Product Information | BL51: WARNING 16 (UNCALLED SEGMENT...) FOR CALLED FUNCTIONInformation in this article applies to:
SYMPTOMSI have written a function called foo and it is called from the same source file. Here is the function:
void foo(void) { };
here is the function call:
if (x & B0)
{
foo();
}
When I build my project I get the following warning: Warning L16: Uncalled Segment, Ignored for Overlay Process for the function foo. Why? CAUSEThis can occur if the function call is unreachable. For example, if either x or B0 is defined as zero ( #define B0 0 ) then the compiler sees this and optimizes out the if statement, as the code inside is unreachable. If there are no other calls to the function, then Warning 16 is generated. RESOLUTIONThere isn't much point writing code that is unreachable. Remove or modify the if statement. MORE INFORMATION
SEE ALSOLast Reviewed: Friday, November 16, 2007 | |||||||
| ||||||||