[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV ac #68
Re: LYNX-DEV ac #68
Thu, 18 Sep 1997 05:36:21 -0400 (EDT)
> On Wed, 17 Sep 1997, T.E.Dickey wrote:
> > 97-09-17
> > --------
> > * Undo misleading/incorrect use of 'const' in HTML.c, and associated
> > modules. - TD
> You made lots of changes here. Did you do this because of compiler
yes/no. The compiler warnings told me about the problem, but it was
a real one. In merging my autoconf macros I picked up the cast-qual
warning this time around, and got a lot of warnings in particular from
HTML.c; studying it I found that it was mostly from one function with
a parameter declared as an array of pointers to const strings - however
most of the use for it was to allow its members to be writable. So I
unraveled it - I've already gotten burned by this before: sooner or later
you'll use the "const" data in a function that needs it to be const, and
you'll get a core dump. (It's ok to cast up to const, but going down
I'll treat like any other code defect - put it on a list for removal).
Having done this (and the configure changes), I did build on all of the
platforms I've got (gcc's too slack on some compiler warnings, so I ran it
against IRIX's compiler, which does an acceptable job).
> I am wondering whether you are just removing symptoms, and we _should_
> get those warnings and change the code in HTML.c instead. How many
> warnings did you get there? (if that's the reason for this change).
30-40 from that function. (there's other warnings, of course, but that
module was the leader).
> > * merge symbols 'has_color' and 'lynx_has_color' to simplify ifdef's,
> > and correct a problem building color-style configuration. - TD
> There was no 'lynx_has_color' anywhere (but a 'lynx_uses_color').
> However, 'lynx_has_color' would be a less misleading name for the
> combined thing, since even when it is true we don't necessarily 'use'
> (show) color. What do you thing about changing it?
sorry - comment is wrong. (I don't care what we call it - but the ifdef's
got entangled by someone's patch, so the color-style code didn't compile).
Thomas E. Dickey
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.