Unused subroutine

A subroutine is defined but never called.

A subroutine that is not called may indicate an error or misspelling in the code that was intended to call this subroutine. It may also indicate that the subroutine is obsolete and was replaced by something else. In these cases, you can save build time and maintenance effort by removing the dead code. On the other hand, it is possible that this code is new code for which the calling code has not yet been written.

ID

Observation

Description

1

Definition

The place the unused subroutine was defined

Example


int never_called()
{
    return 5;
}

int main (int argc, char **argv)
{
    return argc;
}
        

Copyright © 2010, Intel Corporation. All rights reserved.