[Bug c/42884] GCC (v4.3.3) fails to detect uninitialized variable
tstdenis at elliptictech dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 27 14:01:00 GMT 2010
------- Comment #2 from tstdenis at elliptictech dot com 2010-01-27 14:01 -------
Here's the file [I'm getting an internal error when submitting a file]
---warning.c---
#define NULL ((void *)0)
#define OK 0
typedef struct { void *a; } state;
int init(int, state *);
int done(unsigned char *, unsigned long *, state *);
int function(unsigned char *param5, unsigned long param6)
{
state st;
unsigned char dig[128];
unsigned long y, outpos, diglen;
int err;
outpos = 0;
err = OK;
while (err == OK && outpos < param6) {
err = init(0, &st);
if (err == OK) {
diglen = sizeof(dig);
err = done(dig, &diglen, &st);
}
for (y = 0; y < diglen && outpos < param6; y++) {
param5[outpos++] = dig[y];
}
}
return err;
}
--
tstdenis at elliptictech dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|4.3.3 |unknown
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42884
More information about the Gcc-bugs
mailing list