From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653643321650.tru64-unix-managers.marc@archive.invalid> From: Noboom2 () aol ! com Date: Thu, 08 Nov 2001 04:01:56 +0000 To: tru64-unix-managers Subject: C++ question; strange warning X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653643321650 A little C++ question here. Hopefully, there are a few programmers still out there using it. :) I'm getting the following warning when I compile this program. Can anyone explain why? More importantly, how can I eliminate the warning (besides disabling it on the compile command line)? Thanks in advance for any assistance. ------------------------------------------------------------------------------ ------------------------ % cat d.C #include #include struct t { int turn; }; void clearit( t b ) { b.turn = 0; } int main() { t game; clear( game ); return EXIT_SUCCESS; } % cxx -V Compaq C++ V6.3-014 for Digital UNIX V4.0D (Rev. 878) Compiler Driver V6.3-014 (cxx) cxx Driver % cxx d.C cxx: Warning: d.C, line 22: variable "game.turn" is fetched, not initialized clearit( game ); --------^ %