Opened 15 years ago
#1472 new defect
stacktool.c sass_id may be used unitialized.
| Reported by: | Michael Wood-Vasey | Owned by: | eugene |
|---|---|---|---|
| Priority: | low | Milestone: | |
| Component: | ippTools | Version: | |
| Severity: | minor | Keywords: | |
| Cc: |
Description
stacktool.c: In function ‘main’:
stacktool.c:489: warning: ‘sass_id’ may be used uninitialized in this function
stacktool.c:489: note: ‘sass_id’ was declared here
---
Relevant code snippet is:
CZW Add an association entry here.
Define the requested association, and insert it if it doesn't already exist
stackAssociationRow *association = pxStackAssociationDefine(config,stack_id);
psS64 sass_id;
if (!association->sass_id) {
I rewrote the above line as
psS64 sass_id = -1;
but I don't know if (a) this is the right initalization. (b) if later the return type for sass_id might change to unsigned long long (psU64) and this will have to be changed to 0. I fear, however, that 0 is a valid value for a sass_id so -1 seemed the better choice for now.
