In this section:
Insure++ checks that each function returns a result consistent with its declared data type, and that a function with a declared return type actually returns an appropriate value.
In order for Insure++ to find this error, the |
|
The following code demonstrates an inconsistent return error:
/* * File: retinc.c */ func() { return; } |
[retinc.c:4] **RETURN_INCONSISTENT** Function has an inconsistent return type. >> func() { |
Correct inconsistent return errors by either adding appropriate declarations or by making the return type consistent with the function declaration.
/* * File: retinc.c */ void func() { return; } |
/* * File: retinc.c */ int func() { return 0; } |