Informix Error -4492
-4492 Warning: The parameter is assigned a new default value.
More than one copy of the function prototype has occurred in the current scope, and the one indicated by this message has specified a different default value for a formal parameter than that specified by any prototypes already encountered.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4492 is a compiler warning: per the official guidance, more than one copy of a function prototype appears in scope, and the one flagged specifies a different default value for a formal parameter than an earlier-encountered prototype.
- Multiple function prototype copies specifying different default values for the same parameter, per the official guidance — the direct cause.
Solutions / Resolution
- Make all prototype copies use the same default value, if the difference wasn't intentional.
Examples
Disagreeing default values across prototype copies
FUNCTION save(status CHAR(10) DEFAULT "New") RETURNING INTEGER
...
FUNCTION save(status CHAR(10) DEFAULT "Pending") RETURNING INTEGER
-- -4492: the default differs between prototype copies
Corrected
FUNCTION save(status CHAR(10) DEFAULT "New") RETURNING INTEGER
Diagnostic Checks
- Check every prototype copy of the function, and confirm their default values are consistent, unless the later value was intentionally meant to override the earlier one.
Related Errors / Related Topics
- -4491 — "The parameter name has been changed." A related prototype-consistency error, about disagreeing parameter names rather than default values.
Multiple prototype copies of a function specify different default values for the same parameter — confirm this was intentional, or make them consistent.