Imagix 4D User Guide


Functions Not Used in Tasks

The Functions Not Used in Tasks report lists any functions in the project database which are not called in the currently defined tasks. Consider the following example:

void funcA() {return;}
void funcB() {return;}
void funcC() {return;}
void funcD() {return;}
void funcE() {return;}

void Task1() {
    funcA();
    funcB();
}

void Task2() {
    funcB();
    funcC();
}

void Task3() {
    funcC();
    funcD();
}

This report requires that tasks be explicitly defined through the Task Definitions dialog; otherwise, any root function would automatically become the root function for a task, and no functions would be considered unused. In this analysis, tasks have been defined only for the functions Task1 and Task2; therefore, anything uniquely called from the function Task3 is considered unused.

Functions Not Used in Tasks

Task Definitions
Tasks are from User Defined Tasks
Name        Members  Graph  Root
Task 1            3    [+]  Task1
Task 2            3    [+]  Task2

Function                                          File (Line)

funcD                                             funcs_not_called.c (5)
funcE                                             funcs_not_called.c (6)
Task3                                             funcs_not_called.c (18)

In addition to the actual Functions Not Used in Tasks report, the results of this analysis are also available, via option settings, to identify functions in the Graph windows and the File Editors. As you use these windows to examine your software and to understand the issues flagged in the various Task Flow Check reports, you'll find it useful to be aware of any functions which were not part of the task analysis.