Re: Re: recent source code changes

"Arnaud Desitter" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
Hi Terry,

#1 about "pragma unused"
Currently, I use gcc 3.4.2 on Linux. It produces 42 warning such as:
../../src/tidylib.c: In function `tidyGetOption':
../../src/tidylib.c:275: warning: ignoring #pragma unused
See:
http://debian.jones.dk/auryn/pool/sid-jones/tidy/tidy_20040318-0.0.jones.1_powerpc.build
Most probably, gcc as distributed by apple is modified to support
that extension. But for the rest of us, it is a noise generator.

#2 about "_DEBUG"
I added OTHERCFLAGS+= -D_DEBUG=1 -DHAS_VSNPRINTF=1
to build/gmake/Makefile.
First of all, _DEBUG and HAS_VSNPRINTF were not mentioned at all.
Then:
#2.1 Without HAS_VSNPRINTF, tidy is very vulnerable to buffer
overflow. Mangleme crashes tidy after a few iterations without it.
(Incidentally, tidy can now withstand several millions test cases generated
by mangleme without any crash. Not bad.)
Therefore it should be enabled by default. A better design would be to
use HAS_NOT_VSNPRINTF.
#2.2 Without _DEBUG, bugs like http://tidy.sf.net/bug/1156780 do
no get detected. As "-O2" is not enabled for gcc, I figured out that
enabling the checks is more important that a small loss of performance.
I added a note about optimised builds.

In general, tidy has way too many #ifdef in my opinion. But, then,
I have no plan to fix it any soon.
Feel free to alter my changes if necessary.

Regards,


----- Original Message ----- 
From: "Terry Teague" <[email protected]>
To: <[email protected]>
Sent: Monday, March 07, 2005 8:36 AM
Subject: Re: [Tidy-dev] Re: recent source code changes


At 6:05 PM +0100 3/3/05, Bjoern Hoehrmann wrote:
>* Arnaud Desitter wrote:
>>"#pragma unused(xxx)" which causes flood of warnings with gcc.


What version of gcc on what platform? I don't get any warnings with any
version of gcc I use regularly.

>>Granted, I can filter them out but what a pain.
>
>Terry added them (applying a third-party patch, iirc) to actually remove
>compiler warnings. MSVC++ does not support such a pragma so I've then
>added a pragma to disable warnings for `#pragma unused(xxx)`. Sounds
>like we should remove them?

I don't remember adding them, but Björn might be right. Personally I don't
have a problem seeing warning messages, but many other people do.


To hijack this thread slightly - just curious Arnaud why you turned on
_DEBUG in the Makefile recently?


Regards, Terry




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
Tidy-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tidy-develop



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.