36f16b0cb8
Edit C code to reduce warnings from clang. Most warnings are for
implicit declarations of functions, but some warnings want me to add
parentheses or curly braces, or to cast arguments for printf().
Make a few other changes, like declaring float_cst() in h/con_float to
be static, and using C99 bool in ego/ra/makeitems.c and
ego/share/makecldef.c. Such changes don't silence warnings; I make
such changes while I silence warnings in the same file. In
float_cst(), rename parameter `str` to `float_str`, so it doesn't
share a name with the global variable `str`.
Remove `const` from `newmodule(const char *)` in mach/proto/as to
silence a warning. I wrongly added the `const` in d347207
.
For warnings about implicit declarations of functions, the fix is to
declare the function before calling it. For example, my OpenBSD
system needs <sys/wait.h> to declare wait().
In util/int, add "whatever.h" to declare more functions. Remove old
declarations from "mem.h", to prefer the newer declarations of the
same functions in "data.h" and "stack.h".
61 lines
1.3 KiB
C
61 lines
1.3 KiB
C
/*
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
*/
|
|
/* $Id$ */
|
|
|
|
extern int wordsize;
|
|
extern int pointersize;
|
|
extern int nregs;
|
|
extern int nprops;
|
|
extern int ntokens;
|
|
extern int nsets;
|
|
extern int ninstr;
|
|
extern int empatlen;
|
|
extern int emrepllen;
|
|
extern int tokrepllen;
|
|
extern int emmnem[];
|
|
extern int empatexpr;
|
|
extern int codeindex;
|
|
extern int tokpatlen;
|
|
extern int maxtokpatlen;
|
|
extern int maxempatlen;
|
|
extern int maxemrepllen;
|
|
extern int maxtokrepllen;
|
|
extern int tokpatro[];
|
|
extern int tokpatset[];
|
|
extern int nallreg;
|
|
extern int allreg[];
|
|
extern int cursetno;
|
|
extern int allsetno;
|
|
extern int inproc;
|
|
extern int callproc;
|
|
extern int procarg[];
|
|
extern int fc1,fc2,fc3,fc4;
|
|
extern int maxmembers;
|
|
extern int regclass;
|
|
extern int maxtokensize;
|
|
extern int nprocargs, maxprocargs;
|
|
extern int use_tes;
|
|
|
|
/* genenerated files */
|
|
extern void enterkeyw(void);
|
|
extern int yyparse(void);
|
|
|
|
/* emlookup.c */
|
|
extern void initemhash(void);
|
|
|
|
/* error.c */
|
|
extern void fatal(const char* s, ...);
|
|
extern void error(const char* s, ...);
|
|
extern int tabovf(char *string);
|
|
|
|
/* output.c */
|
|
extern void errorexit(void);
|
|
extern void initio(void);
|
|
extern void finishio(void);
|
|
extern void statistics(void);
|
|
|
|
/* strlookup.c */
|
|
extern int strlookup(char *str);
|