[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev patches to squelch Borland compiler warnings
From: |
Webmaster Jim |
Subject: |
lynx-dev patches to squelch Borland compiler warnings |
Date: |
Mon, 23 Aug 1999 01:00:19 -0400 |
I've created patches against lynx283dev6 that cut down on many compiler
warnings from Borland C++Builder. Most of these are casts, with boolean
constructs dominating. Since it's pretty big, I have stored it on my web
site.
The output from an earlier build session with the error messages I tried
to eliminate is in:
http://www.jim.spath.com/lynx/make0817.txt
As an example of the main warning message is:
Warning W8071 src/UCAux.c 175:
Conversion may lose significant digits in function UCSetTransParams
This line toggles transparent mode (I think):
pT->transp = (!strcmp(p_in->MIMEname, "x-transparent") ||
!strcmp(p_out->MIMEname, "x-transparent"));
So I've added "(BOOL)" to this line to make the cast deliberate. The
patch itself is in:
http://www.jim.spath.com/lynx/lynx283dev6p1.txt
Hopefully the tabs and such will work right this way. If not, let me
know and I'll forward it.
The "after" build - http://www.jim.spath.com/lynx/make0822.txt - has a
lot fewer warnings, but some still remain. Messages about always true or
false can be ignored as they relate to compile defines. I restructured
one module to eliminate compiling in unneeded local private functions.
This message I don't quite get:
Warning W8053 src/LYexit.c 130:
'sleep(unsigned int)' is obsolete in function LYexit
There are a few functions that are declared as boolean, but have return
statements of different types. On the other hand, HTConfirmDefault was
declared as BOOL, but seems to allow other values (int result = -1 ...
return (result)). The way I fixed it compiles, but it would make more
sense if the default parameter was boolean as well.
I tested the patch on NetBSD and it compiles and runs. I had a problem
testing the Borland compiler after these changes because of linker
errors that I'm still puzzling out.
Oh, yeah, one spelling typo also ;-)
-** Interruptable connect as implemented for Mosaic by Marc Andreesen
+** Interruptible connect as implemented for Mosaic by Marc Andreesen
------
<http://www.cs.indiana.edu/picons/db/users/us/md/lib/bcpl/jspath/face.xbm>
<http://www.altavista.com/cgi-bin/query?q=%22web+home+for+jim+spath%22>
Marvin the Paranoid Android says:
You realise this is going to be a complete waste of time don't you?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev patches to squelch Borland compiler warnings,
Webmaster Jim <=