[warning-fix][-Wimplicit-*]
Fix warnings such as -- warning: type defaults to ‘int’ in declaration of ‘old_curpos’ [-Wimplicit-int] -- warning: implicit declaration of function ‘STMTlist_out’ [-Wimplicit-function-declaration] Also fix fedex_plus/selects.c:574:8: error: too few arguments to function ‘FundamentalType’, a bug uncovered by fixing the implicit declaration warning. Assumed that the second argument should be 0, like most other calls to the function.
This commit is contained in:
+7
-2
@@ -2,6 +2,9 @@
|
||||
#include <stdio.h>
|
||||
#include <memory.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef __STDC__
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
@@ -31,6 +34,7 @@ void EXPRop1_out(struct Op_Subexpression *eo,char *opcode,int paren);
|
||||
void EXPRop2__out(struct Op_Subexpression *eo,char *opcode,int paren,int pad,int previous_op);
|
||||
void EXPR__out(Expression expr,int paren,int previous_op);
|
||||
void EXPRbounds_out(TypeBody tb);
|
||||
int EXPRlength(Expression e);
|
||||
void FUNC_out(Function fn,int level);
|
||||
void PROC_out(Procedure p,int level);
|
||||
void REFout(Dictionary refdict,Linked_List reflist,char *type,int level);
|
||||
@@ -41,6 +45,7 @@ void SCOPEentities_out(Scope s,int level);
|
||||
void SCOPElocals_out(Scope s,int level);
|
||||
void SCOPEtypes_out(Scope s, int level);
|
||||
void STMT_out(Statement s,int level);
|
||||
void STMTlist_out(Linked_List stmts,int level);
|
||||
void TYPE_out(Type t, int level);
|
||||
void TYPE_head_out(Type t,int level);
|
||||
void TYPE_body_out(Type t, int level);
|
||||
@@ -1838,8 +1843,8 @@ EXPRlength(Expression e)
|
||||
/* Interfacing Definitions */
|
||||
|
||||
#define BIGBUFSIZ 100000
|
||||
static old_curpos;
|
||||
static old_lineno;
|
||||
static int old_curpos;
|
||||
static int old_lineno;
|
||||
static int string_func_in_use = False;
|
||||
static int file_func_in_use = False;
|
||||
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "conf.h"
|
||||
#include <setjmp.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define ERROR_C
|
||||
#include "signal.h"
|
||||
|
||||
@@ -116,6 +116,8 @@ void (*interface_func)(); /* func to attach rename clauses */
|
||||
/* differentiated from other schemas parsed earlier */
|
||||
Linked_List PARSEnew_schemas;
|
||||
|
||||
void SCANskip_to_end_schema(); //in expscan.l
|
||||
|
||||
extern int yylineno;
|
||||
|
||||
static int PARSEchunk_start;
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
*/
|
||||
|
||||
#define EXPRESSION_C
|
||||
#include <unistd.h>
|
||||
#include "express/expr.h"
|
||||
#include "express/resolve.h"
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ static Error ERROR_tilde_expansion_failed;
|
||||
static Error ERROR_schema_not_in_own_schema_file;
|
||||
|
||||
extern Linked_List PARSEnew_schemas;
|
||||
void SCOPEinitialize(void);
|
||||
|
||||
static Express PARSERrun PROTO((char *,FILE *));
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
*/
|
||||
|
||||
#define HASH_C
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "express/hash.h"
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
#define RESOLVE_C
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "express/resolve.h"
|
||||
#include "stack.h"
|
||||
#include "express/schema.h"
|
||||
@@ -1672,7 +1673,7 @@ TYPEget_tagname(Type type) {
|
||||
|
||||
struct tag *
|
||||
TAGcreate_tags() {
|
||||
extern tag_count;
|
||||
extern int tag_count;
|
||||
|
||||
return((struct tag *)calloc(tag_count,sizeof(struct tag)));
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
*/
|
||||
|
||||
#define SCHEMA_C
|
||||
#include <unistd.h>
|
||||
#include "express/expbasic.h"
|
||||
#include "express/schema.h"
|
||||
#include "express/object.h"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include "express/express.h"
|
||||
|
||||
void
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "express/variable.h"
|
||||
#include "express/object.h"
|
||||
|
||||
char * opcode_print(Op_Code o);
|
||||
/*
|
||||
** Procedure: VAR_create/free/copy/equal
|
||||
** Description: These are the low-level defining functions for Class_Variable
|
||||
|
||||
@@ -28,6 +28,12 @@ static char rcsid[] ="$Id: classes.c,v 3.0.1.11 1997/09/18 21:14:46 sauderd Exp
|
||||
#include <stdlib.h>
|
||||
#include "classes.h"
|
||||
|
||||
int isAggregateType (const Type t);
|
||||
int isAggregate (Variable a);
|
||||
Variable VARis_type_shifter (Variable a);
|
||||
const char * ENTITYget_CORBAname (Entity ent);
|
||||
const char * GetTypeDescriptorName( Type t );
|
||||
|
||||
char *FundamentalType(const Type t,int report_reftypes);
|
||||
|
||||
int multiple_inheritance = 1;
|
||||
@@ -47,10 +53,9 @@ int old_accessors = 0;
|
||||
ENTITYincode_print (Entity entity, FILE* file,Schema schema)
|
||||
DAS
|
||||
*/
|
||||
static attr_count; /* number each attr to avoid inter-entity clashes */
|
||||
static type_count; /* number each temporary type for same reason above */
|
||||
static int attr_count; /* number each attr to avoid inter-entity clashes */
|
||||
static int type_count; /* number each temporary type for same reason above */
|
||||
|
||||
char *FundamentalType(const Type,int);
|
||||
extern int any_duplicates_in_select( const Linked_List list );
|
||||
extern int unique_types ( const Linked_List list );
|
||||
extern char* non_unique_types_string ( const Type type );
|
||||
@@ -60,6 +65,8 @@ static void printEnumAggrCrHdr ( FILE *, const Type );
|
||||
static void printEnumAggrCrBody( FILE *, const Type );
|
||||
void printAccessHookFriend( FILE *, const char * );
|
||||
void printAccessHookHdr( FILE *, const char * );
|
||||
int TYPEget_RefTypeVarNm(const Type t,char *buf,Schema schema);
|
||||
void TypeBody_Description(TypeBody body, char *buf);
|
||||
|
||||
/*
|
||||
Turn the string into a new string that will be printed the same as the
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
|
||||
#define SCHEMA_FILE_PREFIX "Sdai"
|
||||
|
||||
char ToLower (char c);
|
||||
char ToUpper (char c);
|
||||
int isAggregateType (const Type t);
|
||||
int isAggregate (Variable a);
|
||||
|
||||
int multiple_inheritance = 0;
|
||||
|
||||
char ** aggrNameList = 0;
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
int isAggregateType (const Type t);
|
||||
|
||||
/* Local function prototypes: */
|
||||
static void initializeMarks( Express );
|
||||
static void unsetObjs( Schema );
|
||||
|
||||
@@ -24,6 +24,14 @@ extern int multiple_inheritance;
|
||||
#include <stdlib.h>
|
||||
#include "classes.h"
|
||||
|
||||
int isAggregateType (const Type t);
|
||||
char * generate_attribute_name( Variable a, char *out );
|
||||
char * FundamentalType(const Type t,int report_reftypes);
|
||||
void ATTRsign_access_methods (Variable a, FILE* file);
|
||||
char * generate_attribute_func_name( Variable a, char *out );
|
||||
void ATTRprint_access_methods_get_head (const char * classnm, Variable a, FILE* file);
|
||||
void ATTRprint_access_methods_put_head (const char * entnm, Variable a, FILE* file);
|
||||
|
||||
#define BASE_SELECT "SCLP23(Select)"
|
||||
|
||||
#define TYPEis_primitive(t) ( !( TYPEis_entity(t) || \
|
||||
@@ -563,7 +571,7 @@ TYPEselect_inc_print_vars( const Type type, FILE *f, Linked_List dups)
|
||||
fprintf( f, "\t// types in SELECT \n" );
|
||||
LISTdo( SEL_TYPEget_items(type), t, Type )
|
||||
fprintf( f, "\t// %s\t-- %d\n",
|
||||
SEL_ITEMget_enumtype (t), FundamentalType (t));
|
||||
SEL_ITEMget_enumtype (t), FundamentalType (t,0));
|
||||
LISTod;
|
||||
|
||||
LISTdo (data_members, t, Type)
|
||||
|
||||
Reference in New Issue
Block a user