[warning-fix][-Wuninitialized]

This commit is contained in:
Mark Pictor
2011-08-20 10:05:18 -04:00
parent 71b3a28909
commit b9156ad636
13 changed files with 14 additions and 16 deletions
+2 -4
View File
@@ -571,7 +571,7 @@ STEPfile::ReadData1( istream & in ) {
std::string tmpbuf;
SCLP23( Application_instance ) * obj = ENTITY_NULL;
stateEnum inst_state; // used if reading working file
stateEnum inst_state = noStateSE; // used if reading working file
ErrorDescriptor e;
@@ -583,7 +583,6 @@ STEPfile::ReadData1( istream & in ) {
in >> c;
if( _fileType == WORKING_SESSION ) {
inst_state = noStateSE;
if( strchr( "CIND", c ) ) { // if there is a valid char
inst_state = EntityWfState( c );
ReadTokenSeparator( in );
@@ -974,7 +973,7 @@ STEPfile::ReadData2( istream & in, int useTechCor ) {
int total_instances = 0;
int valid_insts = 0; // used for exchange file only
stateEnum inst_state; // used if reading working file
stateEnum inst_state = noStateSE; // used if reading working file
_errorCount = 0; // reset error count
_warningCount = 0; // reset error count
@@ -997,7 +996,6 @@ STEPfile::ReadData2( istream & in, int useTechCor ) {
in >> c;
if( _fileType == WORKING_SESSION ) {
inst_state = noStateSE;
if( strchr( "CIND", c ) ) { // if there is a valid char
inst_state = EntityWfState( c );
ReadTokenSeparator( in, &cmtStr );
+1 -1
View File
@@ -220,7 +220,7 @@ int MgrNodeArraySorted::MgrNodeIndex( int fileId ) {
}
int low = 0;
int high = _count - 1;
int mid;
int mid = 0;
int found = 0;
int curFileId;
+1 -1
View File
@@ -96,7 +96,7 @@ int ComplexCollect::supports( EntNode * ents ) const
*/
{
EntNode * node = ents, *nextnode;
AndList * alist;
AndList * alist = 0;
ComplexList * clist = clists, *cl = NULL, *current;
int retval;
EntList * elist, *next;
+1 -1
View File
@@ -101,7 +101,7 @@ void ComplexList::addChildren( EntList * ent )
EntList * child;
char * nm;
EntNode * prev = list, *prev2 = NULL, *newnode;
int comp;
int comp = 0;
if( ent->multiple() ) {
child = ( ( MultList * )ent )->childList;
+1 -1
View File
@@ -85,7 +85,7 @@ MatchType OrList::matchORs( EntNode * ents )
{
int count;
EntList * child = childList;
MatchType retval;
MatchType retval = UNKNOWN;
for( count = 0; count < numchildren; count++, child = child->next ) {
+1 -1
View File
@@ -121,7 +121,7 @@ EntList * MultList::copyList( EntList * ent )
* to the end of our list.
*/
{
EntList * newlist, *child;
EntList * newlist = 0, *child;
switch( ent->join ) {
case SIMPLE:
+1 -1
View File
@@ -53,7 +53,7 @@ ostream & operator << ( ostream & os, MultList & mlist )
*/
{
char jointype[7];
int k, lastSimple;
int k, lastSimple = 0;
// lastSimple - is the last child simple? If so, we need to print another
// line at the end. If not, the children of last child did already.
EntList * child = mlist.childList;
+1 -1
View File
@@ -892,7 +892,7 @@ LOOPout( struct Loop_ *loop, int level ) {
void
CASEout( struct Case_Statement_ *c, int level ) {
int len;
int len = 0;
int max_indent;
raw( "%*sCASE ", level, "" );
+1 -1
View File
@@ -248,7 +248,7 @@ RESOLVEinitialize( void ) {
void
EXP_resolve( Expression expr, Scope scope, Type typecheck ) {
Function f;
Function f = 0;
Symbol * sym;
Generic x;
Entity e;
+1 -1
View File
@@ -96,7 +96,7 @@ int ComplexCollect::supports( EntNode * ents )
*/
{
EntNode * node = ents, *nextnode;
AndList * alist;
AndList * alist = 0;
ComplexList * clist = clists, *cl = NULL, *current;
int retval;
EntList * elist, *next;
+1 -1
View File
@@ -101,7 +101,7 @@ void ComplexList::addChildren( EntList * ent )
EntList * child;
char * nm;
EntNode * prev = list, *prev2 = NULL, *newnode;
int comp;
int comp = 0;
if( ent->multiple() ) {
child = ( ( MultList * )ent )->childList;
+1 -1
View File
@@ -280,7 +280,7 @@ void ComplexList::addImplicitSubs( Linked_List subs, ComplexCollect * col )
EntNode node((char *)"");
// Temp var - used to check if this already contains certain values.
int none_yet = TRUE;
AndOrList * ao;
AndOrList * ao = 0;
LISTdo( subs, subEnt, Entity )
strcpy( node.name, ENTITYget_name( subEnt ) );
+1 -1
View File
@@ -211,7 +211,7 @@ EntList * MultList::copyList( EntList * ent )
* to the end of our list.
*/
{
EntList * newlist, *child;
EntList * newlist = 0, *child;
switch( ent->join ) {
case SIMPLE: