Informix Error -4083: Warning: Initialization of external variables will be ignored.
Cause and resolution
Warning: Initialization of external variables will be ignored.
This is only a warning. This statement declares a variable with both the EXTERNAL keyword and an initialization expression. You can initialize a variable only at the point where it is defined (that is, where memory is allocated for it). This is a declaration, not a definition, so the initialization is ignored.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4083 is a compiler warning: per the official guidance, a variable is declared with both
EXTERNAL and an initialization expression, but a variable can only be initialized where it's
defined (where memory is allocated), not merely declared — so the initializer here is ignored.
- An
EXTERNALvariable declaration that also includes an initialization expression, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the initialization expression from the
EXTERNALdeclaration, since it has no effect, and set the initial value at the module where the variable is actually defined.
Examples
An ignored initializer on an EXTERNAL declaration
EXTERNAL max_retries INTEGER = 3
-- -4083: the "= 3" is ignored here; this is a declaration, not a definition
Corrected
EXTERNAL max_retries INTEGER
Diagnostic Checks
- Check every
EXTERNALvariable declaration for an initialization expression, and remove it, moving any needed initial value to the variable's actual definition.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4083 in this set yet.
An EXTERNAL declaration's initializer is ignored — remove it; initialization only takes
effect at the variable's actual definition.