Commit graph

12 commits

Author SHA1 Message Date
David Given fc0cdc0471 Don't dump statistics unless in verbose mode. 2022-08-01 22:01:18 +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 472654c366 ANSI C conversion and add procedure declarations. 2019-05-11 01:17:24 +08:00
George Koehler 33c0573598 Remove code to calculate memory usage with sbrk().
In many systems, malloc() can allocate outside the brk area.  The
calculation with sbrk() misses those allocations.  When LLgen or ncgg
reported the memory usage, the value was probably too low.
2018-11-14 16:13:54 -05:00
David Given d89f172841 Change fatal() and error() to use varargs. 2013-05-10 12:04:21 +01:00
dtrg cd09c29949 Rationalised use of #includes to be more standards-compliant. 2006-07-18 17:18:42 +00:00
ceriel 5c83e7dbb5 Header --> Id 1994-06-24 11:31:16 +00:00
ceriel 44a1c5620c Removed # in commands, changed mechanism for computing mem used 1992-06-26 12:47:07 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel c428b33acc replaced return by exit 1987-03-09 14:22:45 +00:00
ceriel 9e528bef6f Allow reading from standard input 1987-01-12 14:38:45 +00:00
sater 72b83cca59 *** empty log message *** 1985-01-08 09:59:28 +00:00