I think PD must have originally been inherited from the Pre-ANSI C days :-)
Is it just me, or does anyone else have an urge to clean the thing up before the project grows further?
warnings. Perhaps the #pragmas in gcc are a bit weak (to disable specific warnings) and this is why -Wall isn't used by default?
where the functions are called, as opposed to using an include-file.
and declarations!
If anyone is interested in collaborating, perhaps, on cleaning this up, please contact me at lt@westnet.com
Larry
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --
Larry Troxler writes:
- Compiling with -Wall on gcc/Linux results in many screen fulls of
warnings. Perhaps the #pragmas in gcc are a bit weak (to disable specific warnings) and this is why -Wall isn't used by default?
No, I just forgot to use any special warning flags, because the code was easily portable and I had no problems with it. But for the future I think it would be ok to use some warning flags.
I don't think that a major cleanup is needed. Running gcc with -Wall -Wno-unused will put out warnigs about
suggesting paranthesis for assignment used as truth value.
Cleaning this up wouldn't be a major task and including this warnings are sometimes very useful.
unhandled enumeration values in switch. Just add a default case
stdio formatting mismatches
just a few
- There as some function prototypes patched directly into the C files
where the functions are called, as opposed to using an include-file.
I think this is ok for local functions
- Some files (the Tk ones?) use the old K&R-style function definitions
and declarations!
This is ugly in my opinion too.
In my opionion it would be ok cleaning this up.
Guenter
On Mon, 9 Feb 1998, Guenter Geiger wrote:
Larry Troxler writes:
- Compiling with -Wall on gcc/Linux results in many screen fulls of
warnings. Perhaps the #pragmas in gcc are a bit weak (to disable specific warnings) and this is why -Wall isn't used by default?
No, I just forgot to use any special warning flags, because the code was easily portable and I had no problems with it. But for the future I think it would be ok to use some warning flags.
I don't think that a major cleanup is needed. Running gcc with -Wall -Wno-unused will put out warnigs about
Yes, now that I've spent more time with the code, I realize it's not as bad as a lot of other Unix code I've seen. I think the problem is that there are some conventions used in this project, that aren't immediately obvious. I've taken the liberty of adding some more text to the src/notes file, which will hopefully save others some frustation. So, Miller, Guenter, let me know what I should do with my additions.
- There as some function prototypes patched directly into the C files
where the functions are called, as opposed to using an include-file.
I think this is ok for local functions
But these prototypes aren't for local functions, they are for functions in other modules. I see from src/notes, that this was actually intentional, so I guess it's just a matter of varying preferences.
Larry
-- Larry Troxler -- lt@westnet.com -- Patterson, NY USA --