Commit graph

12 commits

Author SHA1 Message Date
David Given 3f64b7c8c1 Don't spam the output with debug information unless -v is set. 2022-08-01 21:58:01 +02:00
George Koehler 36f16b0cb8 Cut down some clang warnings
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".
2019-10-30 18:36:38 -04:00
carl dfefbcae86 ANSI C conversion. 2019-05-11 01:13:43 +08:00
David Given 9f23fbbe6a Allow machines to use cg if they wish.
--HG--
rename : mach/proto/ncg/build.mk => mach/proto/cg/build.mk
rename : util/ncgg/build.mk => util/cgg/build.mk
2015-03-23 00:08:51 +01:00
dtrg 4c0a0e6119 Rationalised use of #includes to be more standards-compliant. 2006-07-18 17:10:29 +00:00
ceriel 862f5da86d use 0xFFFF mask for printing shorts, and work around gcc 2.4.5 bug 1993-11-18 15:35:03 +00:00
ceriel 332b6cb337 Minor changes: gave double def of __ctype with gcc on solaris 2 1993-11-12 15:16:08 +00:00
ceriel a93813c1f6 Made acceptable for our ANSI C compiler 1991-12-03 11:03:58 +00:00
ceriel 319d9bcfe0 declaration of sprintf only if __STDC__ is not defined 1989-08-21 11:43:41 +00:00
ceriel fb53750ee3 fixed error in declaration of sprintf 1988-07-28 18:18:29 +00:00
ceriel 351429c19c make to work again 1988-07-14 09:15:21 +00:00
ceriel 290cb0660d Split in several files. Did not compile on Xenix 1988-07-08 13:57:07 +00:00