ARM Technical Support Knowledge Articles

WARNING 16 (UNCALLED SEGMENT...) FOR CALLED FUNCTION

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


SYMPTOMS

I 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?

CAUSE

This 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.

RESOLUTION

There isn't much point writing code that is unreachable. Remove or modify the if statement.

MORE INFORMATION

SEE ALSO

Article last edited on: 2007-11-16 15:26:07

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential