This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

'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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]