Insure++ Reference - FUNC_UNINIT_PTR
This error is generated when a call is made through an uninitialized
function pointer.
This code attempts to call a function through a pointer that has not
been set.
1: /*
2: * File: funcuptr.c
3: */
4: main()
5: {
6: void (*a)();
7:
8: a();
9: return (0);
10: }
[funcuptr.c:8] **FUNC_UNINIT_PTR**
1. >> a();
2. Function pointer is uninitialized: a
Stack trace where the error occurred:
3. main() funcuptr.c, 8
4. **Memory corrupted. Program may crash!!**
- Source line at which the problem was detected.
- Description of the problem and the expression that is in error.
- Stack trace showing the function call sequence leading to the
error.
- Informational message indicating that a serious error has
occurred which may cause the program to crash.
This problem normally occurs because some assignment statement has
been omitted from the code. The current example can be fixed as follows
extern void myfunc();
main()
{
void (*a)();
a = myfunc;
a();
}
FUNC_NULL
FUNC_WILD
|