[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LYNX-DEV ac #69 (was Re: ac #68)
From: |
Klaus Weide |
Subject: |
LYNX-DEV ac #69 (was Re: ac #68) |
Date: |
Thu, 18 Sep 1997 22:31:01 -0500 (CDT) |
On Thu, 18 Sep 1997, T.E.Dickey wrote:
> > 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
> > warnings?
> 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 just checked in #69. That contains all your other changes from #68, but
not your change to the start_element template and resulting other changes.
Instead I have made other changes to cut down the number of `const'
warnings - I got 35 of them for a full compile, of which 8 are in HTML.c.
That is with gcc (on sol), with -Wcast-qual. Could you check what that
stricter compiler has to say now? We can still merge your changes back
in that I have excluded, but I don't think it's the right way to change
the specification of Lynx <-> libwww interface just because HTML.c is
not behaving according to it. With only a few warnings in HTML.c left,
it will be easy to make the changes in HTML.c to really treat the `value'
parameter as a (const char **). I.e. to make HTML.c "behave", rather than
removing the dignostics by dropping CONST.
I hope these changes (either #68 or #69) don't generate new problems for
compilers we haven't tested or mess up things mor for VMS, so folks should
test and report problems, as usual...
Klaus
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;