Skip to content

Commit 6686e3f

Browse files
author
Nicholas Reed
committed
fix missing types, prototypes, and returns based on SCL git 562f4de, 6e6b8ca, 2dc4e7e, fd1d32c, 99407fb, and b5238df
1 parent a71b0c9 commit 6686e3f

File tree

13 files changed

+33
-11
lines changed

13 files changed

+33
-11
lines changed

src/clstepcore/STEPattributeList.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ STEPattribute & STEPattributeList::operator []( int n ) {
4747
// else
4848
cerr << "\nERROR in STEP Core library: " << __FILE__ << ":"
4949
<< __LINE__ << "\n" << _POC_ << "\n\n";
50+
return *( STEPattribute * ) 0;
5051
}
5152

5253
int STEPattributeList::list_length() {

src/exppp/exppp.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ void EXPRop1_out( struct Op_Subexpression * eo, char * opcode, int paren );
2828
void EXPRop2__out( struct Op_Subexpression * eo, char * opcode, int paren, int pad, int previous_op );
2929
void EXPR__out( Expression expr, int paren, int previous_op );
3030
void EXPRbounds_out( TypeBody tb );
31+
int EXPRlength( Expression e );
3132
void FUNC_out( Function fn, int level );
3233
void PROC_out( Procedure p, int level );
3334
void REFout( Dictionary refdict, Linked_List reflist, char * type, int level );
@@ -38,6 +39,7 @@ void SCOPEentities_out( Scope s, int level );
3839
void SCOPElocals_out( Scope s, int level );
3940
void SCOPEtypes_out( Scope s, int level );
4041
void STMT_out( Statement s, int level );
42+
void STMTlist_out( Linked_List stmts, int level );
4143
void TYPE_out( Type t, int level );
4244
void TYPE_head_out( Type t, int level );
4345
void TYPE_body_out( Type t, int level );
@@ -569,7 +571,7 @@ SCOPEalgs_out( Scope s, int level ) {
569571
SCOPEprocs_out( s, level );
570572
}
571573

572-
static
574+
static int
573575
min( int a, int b, int c ) {
574576
if( a < b ) {
575577
return ( ( a < c ) ? a : c );
@@ -1015,6 +1017,7 @@ STMT_out( Statement s, int level ) {
10151017
}
10161018
}
10171019

1020+
void
10181021
STMTlist_out( Linked_List stmts, int level ) {
10191022
LISTdo( stmts, stmt, Statement )
10201023
STMT_out( stmt, level );
@@ -1956,8 +1959,8 @@ EXPRlength( Expression e ) {
19561959
/* Interfacing Definitions */
19571960

19581961
#define BIGBUFSIZ 100000
1959-
static old_curpos;
1960-
static old_lineno;
1962+
static int old_curpos;
1963+
static int old_lineno;
19611964
static bool string_func_in_use = false;
19621965
static bool file_func_in_use = false;
19631966

src/express/expparse.y

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ YYSTYPE yylval;
119119
/* differentiated from other schemas parsed earlier */
120120
Linked_List PARSEnew_schemas;
121121

122+
void SCANskip_to_end_schema(perplex_t scanner);
123+
122124
int yylineno;
123125

124126

src/express/express.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ static Error ERROR_tilde_expansion_failed;
238238
static Error ERROR_schema_not_in_own_schema_file;
239239

240240
extern Linked_List PARSEnew_schemas;
241+
void SCOPEinitialize(void);
241242

242243
static Express PARSERrun PROTO( ( char *, FILE * ) );
243244

src/express/hash.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@
106106
*/
107107

108108
#include <assert.h>
109+
#include <string.h>
109110
#include <stdlib.h>
110111
#include "express/hash.h"
111112

src/express/object.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ Symbol *
3131
UNK_get_symbol( Generic x ) {
3232
fprintf( stderr, "OBJget_symbol called on object of unknown type\n" );
3333
ERRORabort( 0 );
34-
#if defined(lint) || defined(CENTERLINE)
3534
return 0;
36-
#endif
3735
}
3836

3937
/*

src/express/resolve.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1714,7 +1714,7 @@ SCHEMAresolve_pass2( Schema * schema ) {
17141714

17151715
struct tag *
17161716
TAGcreate_tags() {
1717-
extern tag_count;
1717+
extern int tag_count;
17181718

17191719
return( ( struct tag * )calloc( tag_count, sizeof( struct tag ) ) );
17201720
}

src/express/variable.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
#include <stdlib.h>
8686
#include "express/variable.h"
8787
#include "express/object.h"
88+
char * opcode_print(Op_Code o);
8889

8990
struct freelist_head VAR_fl;
9091

src/fedex_plus/classes.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ N350 ( August 31, 1993 ) of ISO 10303 TC184/SC4/WG7.
2727
#include <stdlib.h>
2828
#include "classes.h"
2929

30+
int isAggregateType( const Type t );
31+
int isAggregate( Variable a );
32+
Variable VARis_type_shifter( Variable a );
33+
3034
static_inline
3135
bool
3236
LISTempty( Linked_List list ) {
@@ -55,8 +59,8 @@ int old_accessors = 0;
5559
ENTITYincode_print (Entity entity, FILE* file,Schema schema)
5660
DAS
5761
*/
58-
static attr_count; /* number each attr to avoid inter-entity clashes */
59-
static type_count; /* number each temporary type for same reason above */
62+
static int attr_count; /* number each attr to avoid inter-entity clashes */
63+
static int type_count; /* number each temporary type for same reason above */
6064

6165
extern int any_duplicates_in_select( const Linked_List list );
6266
extern int unique_types( const Linked_List list );
@@ -65,6 +69,8 @@ static void printEnumCreateHdr( FILE *, const Type );
6569
static void printEnumCreateBody( FILE *, const Type );
6670
static void printEnumAggrCrHdr( FILE *, const Type );
6771
static void printEnumAggrCrBody( FILE *, const Type );
72+
int TYPEget_RefTypeVarNm( const Type t, char * buf, Schema schema );
73+
void TypeBody_Description(TypeBody body, char *buf);
6874

6975
/*
7076
Turn the string into a new string that will be printed the same as the
@@ -2783,6 +2789,7 @@ strcat_bounds( TypeBody b, char * buf ) {
27832789
strcat( buf, "]" );
27842790
}
27852791

2792+
void
27862793
TypeBody_Description( TypeBody body, char * buf ) {
27872794
char * s;
27882795

src/fedex_plus/classes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct EntityTag_ {
8888
Entity ENTITYget_superclass( Entity entity );
8989
Entity ENTITYput_superclass( Entity entity );
9090
int ENTITYhas_explicit_attributes( Entity e );
91-
Linked_List ENTITYget_first_attribs( Entity entity, Linked_List result );
91+
void ENTITYget_first_attribs( Entity entity, Linked_List result );
9292

9393
typedef struct SelectTag_ * SelectTag;
9494
struct SelectTag_ {

0 commit comments

Comments
 (0)