This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
'xxx' may be used uninitialized in this function
- From: "Bruce Korb" <bkorb at gnu dot org>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 9 Aug 2006 08:35:42 -0700
- Subject: 'xxx' may be used uninitialized in this function
Hi,
I've added `` xxx = 0'' to my code, but nevertheless it would be nice
if there were a way to tell the compiler to not worry. If I could not
find the right way, I apologize in advance. So, two suggestions:
int xxx = __random__;
or else:
extern void yyy( int* zzz __sets_value__ );
void foo(void) {
int xxx;
yyy( &xxx );
....
Where "__sets_value__" implies both that the current value is not
accessed and that it will be set before returning, so hush up about
any uninitialized argument value. Otherwise, I definitely do like
the warning turned on!
Thanks - Bruce