Skip to content

Commit cac6c3f

Browse files
committed
fix some warnings
1 parent 16bb7f9 commit cac6c3f

5 files changed

Lines changed: 51 additions & 54 deletions

File tree

include/express/lexact.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ extern SC_EXPRESS_EXPORT Error ERROR_nonascii_char;
100100
/***********************/
101101

102102
extern SC_EXPRESS_EXPORT void SCANinitialize PROTO( ( void ) );
103+
extern SC_EXPRESS_EXPORT void SCANcleanup( void );
103104
extern SC_EXPRESS_EXPORT int SCANprocess_real_literal PROTO( ( const char * ) );
104105
extern SC_EXPRESS_EXPORT int SCANprocess_integer_literal PROTO( ( const char * ) );
105106
extern SC_EXPRESS_EXPORT int SCANprocess_binary_literal PROTO( ( const char * ) );
@@ -110,9 +111,6 @@ extern SC_EXPRESS_EXPORT int SCANprocess_encoded_string PROTO( ( const char * )
110111
extern SC_EXPRESS_EXPORT int SCANprocess_semicolon PROTO( ( const char *, int ) );
111112
extern SC_EXPRESS_EXPORT void SCANsave_comment PROTO( ( const char * ) );
112113
extern SC_EXPRESS_EXPORT bool SCANread PROTO( ( void ) );
113-
#ifdef macros_bit_the_dust
114-
extern SC_EXPRESS_EXPORT void SCANdefine_macro PROTO( ( char *, char * ) );
115-
#endif
116114
extern SC_EXPRESS_EXPORT void SCANinclude_file PROTO( ( char * ) );
117115
SC_EXPRESS_EXPORT void SCANlowerize PROTO( ( char * ) );
118116
SC_EXPRESS_EXPORT void SCANupperize PROTO( ( char * ) );

src/base/sc_getopt.h

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
/****** RENAMED from xgetopt.h to sc_getopt.h ***********/
2-
// XGetopt.h Version 1.2
3-
//
4-
// Author: Hans Dietrich
5-
// hdietrich2@hotmail.com
6-
//
7-
// This software is released into the public domain.
8-
// You are free to use it in any way you like.
9-
//
10-
// This software is provided "as is" with no expressed
11-
// or implied warranty. I accept no liability for any
12-
// damage or loss of business that this software may cause.
13-
//
14-
///////////////////////////////////////////////////////////////////////////////
15-
1+
/** \file sc_getopt.h
2+
* this was xgetopt.h
3+
* XGetopt.h Version 1.2
4+
*
5+
* Author: Hans Dietrich
6+
* hdietrich2@hotmail.com
7+
*
8+
* This software is released into the public domain.
9+
* You are free to use it in any way you like.
10+
*
11+
* This software is provided "as is" with no expressed
12+
* or implied warranty. I accept no liability for any
13+
* damage or loss of business that this software may cause.
14+
*/
1615
#ifndef XGETOPT_H
1716
#define XGETOPT_H
1817
#include "sc_export.h"
@@ -30,4 +29,4 @@ extern "C" {
3029
}
3130
#endif
3231

33-
#endif //XGETOPT_H
32+
#endif /* XGETOPT_H */

src/exp2cxx/classes_misc.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ N350 ( August 31, 1993 ) of ISO 10303 TC184/SC4/WG7.
2525
extern char * sc_version();
2626

2727
extern int multiple_inheritance;
28-
/*extern int corba_binding; */
2928

3029
/******************************************************************
3130
** The following functions will be used ***
@@ -352,12 +351,6 @@ AccessType( Type t ) {
352351
static char nm [BUFSIZ];
353352
strncpy( nm, TypeName( t ), BUFSIZ - 4 );
354353
if( TYPEis_entity( t ) ) {
355-
/* if(corba_binding)
356-
{
357-
if (TYPEget_name (t))
358-
strncpy (nm, FirstToUpper (TYPEget_name (t)), BUFSIZ-1);
359-
}
360-
*/
361354
strcat( nm, "_ptr" );
362355
return nm;
363356
} else if( TYPEis_select( t ) || TYPEis_aggregate( t ) ) {

src/express/express.c

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
#include "expparse.h"
8585
#include "expscan.h"
8686
#include "parse_data.h"
87+
#include "express/lexact.h"
8788

8889
void * ParseAlloc( void * ( *mallocProc )( size_t ) );
8990
void ParseFree( void * parser, void ( *freeProc )( void * ) );
@@ -609,6 +610,9 @@ void EXPRESSparse( Express model, FILE * fp, char * filename ) {
609610
PARSERrun( filename, model->u.express->file = fp );
610611
}
611612

613+
/* TODO LEMON ought to put this in expparse.h */
614+
void parserInitState();
615+
612616
/** start parsing a new schema file */
613617
static Express PARSERrun( char * filename, FILE * fp ) {
614618
extern void SCAN_lex_init PROTO( ( char *, FILE * ) );
@@ -633,7 +637,8 @@ static Express PARSERrun( char * filename, FILE * fp ) {
633637
parserInitState();
634638

635639
yyerrstatus = 0;
636-
// ParseTrace( stderr, "- expparse - " ); //NOTE uncomment this to enable parser tracing
640+
/* NOTE uncomment the next line to enable parser tracing */
641+
/* ParseTrace( stderr, "- expparse - " ); */
637642
while( ( tokenID = yylex( scanner ) ) > 0 ) {
638643
Parse( parser, tokenID, yylval, parseData );
639644
}
@@ -660,8 +665,10 @@ static void RENAMEresolve( Rename * r, Schema s );
660665
* find the final object to which a rename points
661666
* i.e., follow chain of USEs or REFs
662667
* sets DICT_type
668+
*
669+
* Sept 2013 - remove unused param enum rename_type type (TODO should this be used)?
663670
*/
664-
static Generic SCOPEfind_for_rename( Scope schema, char * name, enum rename_type type ) {
671+
static Generic SCOPEfind_for_rename( Scope schema, char * name ) {
665672
Generic result;
666673
Rename * rename;
667674

@@ -674,13 +681,13 @@ static Generic SCOPEfind_for_rename( Scope schema, char * name, enum rename_type
674681
}
675682

676683
/* Occurs in a fully USE'd schema? */
677-
LISTdo( schema->u.schema->use_schemas, schema, Schema )
678-
/* follow chain'd USEs */
679-
result = SCOPEfind_for_rename( schema, name, use );
680-
if( result ) {
681-
return( result );
682-
}
683-
LISTod;
684+
LISTdo( schema->u.schema->use_schemas, use_schema, Schema ) {
685+
/* follow chain'd USEs */
686+
result = SCOPEfind_for_rename( use_schema, name );
687+
if( result ) {
688+
return( result );
689+
}
690+
} LISTod;
684691

685692
/* Occurs in a partially USE'd schema? */
686693
rename = ( Rename * )DICTlookup( schema->u.schema->usedict, name );
@@ -725,7 +732,7 @@ static void RENAMEresolve( Rename * r, Schema s ) {
725732
}
726733
resolve_in_progress_raw( r->old );
727734

728-
remote = SCOPEfind_for_rename( r->schema, r->old->name, r->rename_type );
735+
remote = SCOPEfind_for_rename( r->schema, r->old->name );
729736
if( remote == 0 ) {
730737
ERRORreport_with_symbol( ERROR_ref_nonexistent, r->old,
731738
r->old->name, r->schema->symbol.name );
@@ -891,24 +898,24 @@ void EXPRESSresolve( Express model ) {
891898
/* add news schemas to end, drop old ones off the front as we */
892899
/* process them. */
893900

894-
LISTdo( PARSEnew_schemas, schema, Schema )
895-
if( print_objects_while_running & OBJ_SCHEMA_BITS ) {
896-
fprintf( stdout, "pass %d: %s (schema)\n",
897-
EXPRESSpass, schema->symbol.name );
898-
}
901+
LISTdo( PARSEnew_schemas, print_schema, Schema ) {
902+
if( print_objects_while_running & OBJ_SCHEMA_BITS ) {
903+
fprintf( stdout, "pass %d: %s (schema)\n",
904+
EXPRESSpass, print_schema->symbol.name );
905+
}
899906

900-
if( schema->u.schema->uselist )
901-
connect_lists( model->symbol_table,
902-
schema, schema->u.schema->uselist );
903-
if( schema->u.schema->reflist )
904-
connect_lists( model->symbol_table,
905-
schema, schema->u.schema->reflist );
906-
907-
connect_schema_lists( model->symbol_table,
908-
schema, schema->u.schema->use_schemas );
909-
connect_schema_lists( model->symbol_table,
910-
schema, schema->u.schema->ref_schemas );
911-
LISTod;
907+
if( print_schema->u.schema->uselist )
908+
connect_lists( model->symbol_table,
909+
print_schema, print_schema->u.schema->uselist );
910+
if( print_schema->u.schema->reflist )
911+
connect_lists( model->symbol_table,
912+
print_schema, print_schema->u.schema->reflist );
913+
914+
connect_schema_lists( model->symbol_table,
915+
print_schema, print_schema->u.schema->use_schemas );
916+
connect_schema_lists( model->symbol_table,
917+
print_schema, print_schema->u.schema->ref_schemas );
918+
} LISTod;
912919

913920
LISTfree( PARSEnew_schemas );
914921
PARSEnew_schemas = 0; /* just in case */

src/express/fedex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
extern int exp_yydebug;
8787
#endif /*YYDEBUG*/
8888

89-
char EXPRESSgetopt_options[256] = "Bbd:e:i:w:p:rvz"; //larger than the string because exp2cxx, exppp, etc may append their own options
89+
char EXPRESSgetopt_options[256] = "Bbd:e:i:w:p:rvz"; /* larger than the string because exp2cxx, exppp, etc may append their own options */
9090
static int no_need_to_work = 0; /* TRUE if we can exit gracefully without doing any work */
9191

9292
void print_fedex_version( void ) {

0 commit comments

Comments
 (0)