Solve some gcc warnings in ego.

Some of these are from gcc -Wimplicit
This commit is contained in:
George Koehler 2018-03-08 18:51:07 -05:00
parent 860df1b067
commit 12643f1740
9 changed files with 14 additions and 12 deletions

View file

@ -25,7 +25,7 @@
int Scs; /* Number of optimizations found. */ int Scs; /* Number of optimizations found. */
STATIC cs_clear() STATIC void cs_clear()
{ {
clr_avails(); clr_avails();
clr_entities(); clr_entities();
@ -74,9 +74,7 @@ STATIC void cs_optimize(void *vp)
} }
} }
main(argc, argv) int main(int argc, char *argv[])
int argc;
char *argv[];
{ {
Scs = 0; Scs = 0;
go(argc, argv, no_action, cs_optimize, cs_machinit, no_action); go(argc, argv, no_action, cs_optimize, cs_machinit, no_action);

View file

@ -11,6 +11,7 @@
#include "cs.h" #include "cs.h"
#include "cs_aux.h" #include "cs_aux.h"
#include "cs_avail.h" #include "cs_avail.h"
#include "cs_debug.h"
#include "cs_entity.h" #include "cs_entity.h"
#ifdef VERBOSE #ifdef VERBOSE
@ -48,7 +49,7 @@ STATIC void showinstr(line_p lnp)
fprintf(stderr,"\n"); fprintf(stderr,"\n");
} }
SHOWOCCUR(occur_p ocp) void SHOWOCCUR(occur_p ocp)
{ {
/* Shows all instructions in an occurrence. */ /* Shows all instructions in an occurrence. */

View file

@ -14,6 +14,7 @@
#include "../share/cset.h" #include "../share/cset.h"
#include "../share/lset.h" #include "../share/lset.h"
#include "cs.h" #include "cs.h"
#include "cs_alloc.h"
#include "cs_aux.h" #include "cs_aux.h"
#include "cs_debug.h" #include "cs_debug.h"
#include "cs_avail.h" #include "cs_avail.h"

View file

@ -9,9 +9,11 @@
*/ */
#include <stdio.h> #include <stdio.h>
#include "types.h"
#include "debug.h"
#include "files.h" #include "files.h"
struct files* findfiles(int argc, const char** argv) struct files* findfiles(int argc, char * const *argv)
{ {
static struct files files; static struct files files;

View file

@ -33,11 +33,11 @@ struct files
/* The rest of the arguments. */ /* The rest of the arguments. */
const char** argv; char * const *argv;
int argc; int argc;
}; };
struct files* findfiles(int argc, const char** argv); struct files* findfiles(int argc, char * const *argv);
FILE *openfile(const char *name, const char *mode); FILE *openfile(const char *name, const char *mode);
/* /*

View file

@ -285,7 +285,7 @@ dblock_p getdtable(const char *dname)
/* getbblocks */ /* getbblocks */
STATIC argstring(short length, argb_p abp) STATIC void argstring(short length, argb_p abp)
{ {
while (length--) { while (length--) {

View file

@ -42,7 +42,7 @@ STATIC void mach_init(char* machfile, void (*phase_machinit)(void *))
fclose(f); fclose(f);
} }
void go(int argc, const char** argv, void go(int argc, char * const *argv,
void (*initialize)(void *), void (*optimize)(void *), void (*initialize)(void *), void (*optimize)(void *),
void (*phase_machinit)(void *), void (*proc_flag)(void *)) void (*phase_machinit)(void *), void (*proc_flag)(void *))
{ {

View file

@ -22,7 +22,7 @@
* and 'optimize' is called with the current procedure * and 'optimize' is called with the current procedure
* as parameter. * as parameter.
*/ */
void go(int argc, const char** argv, void go(int argc, char * const *argv,
void (*initialize)(void *null), void (*initialize)(void *null),
void (*optimize)(void *), /* (proc_p *p) */ void (*optimize)(void *), /* (proc_p *p) */
void (*phase_machinit)(void *), /* (FILE *f) */ void (*phase_machinit)(void *), /* (FILE *f) */

View file

@ -46,7 +46,7 @@ typedef struct elemholder *lset;
typedef struct bitvector *cset; typedef struct bitvector *cset;
typedef elem_p Lindex; typedef elem_p Lindex;
typedef short Cindex; typedef short Cindex;
typedef char *Lelem_t; typedef void *Lelem_t;
typedef short Celem_t; typedef short Celem_t;
typedef union pext_t *pext_p; typedef union pext_t *pext_p;