[warning-fix][-Wuninitialized]
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
@@ -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, "" );
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 ) );
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user