Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cleditor/STEPfile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2924,6 +2924,10 @@ STEPfile::AppendFile (istream* in, int useTechCor)
// valid_insts = ReadWorkingData2 (*in2);
valid_insts = ReadData2 (*in2, useTechCor);
break;
default:
cerr << "STEPfile::AppendFile: type " << _fileType << " not handled by switch statement. " << __FILE__ << ":" << __LINE__ << endl;
abort();

}

//check for "ENDSEC;"
Expand Down
3 changes: 3 additions & 0 deletions src/clstepcore/STEPcomplex.cc
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,9 @@ STEPcomplex::BuildAttrs(const char *s )
#endif
break;
}
default:
cerr << "STEPcomplex::BuildAttrs: type " << ad->NonRefType() << " not handled by switch statement. " << __FILE__ << ":" << __LINE__ << endl;
abort();
}

a -> set_null ();
Expand Down
3 changes: 3 additions & 0 deletions src/exppp/exppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1400,6 +1400,9 @@ TYPE_body_out(Type t, int level)
wrap(" OF");
TYPEunique_or_optional_out(tb);
break;
default:
printf("Error in %s, line %d: type %d not handled by switch statement.",__FILE__,__LINE__,tb->type);
abort();
}

TYPE_head_out(tb->base,level);
Expand Down
2 changes: 2 additions & 0 deletions src/express/type.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,8 @@ TYPEinherits_from(Type t, enum type_enum e)
return((tb->type == set_)?True:TYPE_inherits_from(tb->base,e));
case list_:
return((tb->type == list_)?True:TYPE_inherits_from(tb->base,e));
default:
break;
}
return (tb->type == e);
}
Expand Down
24 changes: 17 additions & 7 deletions src/fedex_plus/classes.c
Original file line number Diff line number Diff line change
Expand Up @@ -3318,18 +3318,22 @@ ENTITYlib_print (Entity entity, FILE* file,Schema schema)
LIBmemberFunctionPrint (entity, file);
}

//FIXME should return bool
/* return 1 if types are predefined by us */
int
TYPEis_builtin(const Type t) {
switch( TYPEget_body(t)->type) {/* dunno if correct*/
case integer_:
case real_:
case string_:
case binary_:
case boolean_:
case number_:
case logical_:
case integer_:
case real_:
case string_:
case binary_:
case boolean_:
case number_:
case logical_:
return 1;
break;
default:
break;
}
return 0;
}
Expand Down Expand Up @@ -3750,6 +3754,9 @@ ENTITYincode_print (Entity entity, FILE* file,Schema schema)
TYPEget_body(v->type)->base->symbol.name);
fprintf(file,"// inverse entity 3 %s\n",TYPEget_body(v->type)->base->symbol.name);
break;
default:
printf("Error in %s, line %d: type %d not handled by switch statement.",__FILE__,__LINE__,TYPEget_body(v->type)->type);
abort();
}
}
}
Expand Down Expand Up @@ -4522,6 +4529,9 @@ TypeBody_Description(TypeBody body, char *buf)
strcat(buf," OF");
if (body->flags.unique) strcat(buf," UNIQUE");
break;
default:
printf("Error in %s, line %d: type %d not handled by switch statement.",__FILE__,__LINE__,body->type);
abort();
}

Type_Description(body->base,buf);
Expand Down
3 changes: 3 additions & 0 deletions src/fedex_plus/classes_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,9 @@ GetTypeDescriptorName( Type t )
case number_:
case generic_:
return "TypeDescriptor";
default:
printf("Error in %s, line %d: type %d not handled by switch statement.",__FILE__,__LINE__,TYPEget_body(t)->type);
abort();
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/fedex_plus/selects.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,9 @@ non_unique_types_vector ( const Type type, int* tvec )
case number_:
tvec[tnumber]++;
break;
default:
printf("Error in %s, line %d: type %d not handled by switch statement.",__FILE__,__LINE__,TYPEget_body(t)->type);
abort();
}
LISTod;
}
Expand Down