bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] Broken 'DEBUG_MALLOC' code


From: Tim Ruehsen
Subject: Re: [Bug-wget] Broken 'DEBUG_MALLOC' code
Date: Fri, 08 Nov 2013 09:53:30 +0100
User-agent: KMail/4.10.5 (Linux/3.11-1-amd64; KDE/4.10.5; x86_64; ; )

Hi,

> Anyway, to the point. I tried my old MingW makefile on the latest git-repo.
> It stumbled on some code inside 'DEBUG_MALLOC'. Here in init.c (line 1737):
> 
>     for (i = 0; i < nurl; i++)
>       xfree (url[i]);
> 
> Should 'nurl' and 'url' in main.c be made public?

IMO, the cleanup() routine should go into main.c.
That is the right place - cleanup() is used only once at all (called by main() 
in main.c).

Just to make it clear to other readers:
Right now, Wget fails to compile with -DDEBUG_MALLOC.

init.c: In function 'cleanup':
init.c:1737:8: error: 'i' undeclared (first use in this function)
   for (i = 0; i < nurl; i++)
        ^
init.c:1737:8: note: each undeclared identifier is reported only once for each 
function it appears in
init.c:1737:19: error: 'nurl' undeclared (first use in this function)
   for (i = 0; i < nurl; i++)
                   ^
init.c:1738:12: error: 'url' undeclared (first use in this function)
     xfree (url[i]);

Thatnks for pointing this out.
Are you going to create a patch ?

Tim




reply via email to

[Prev in Thread] Current Thread [Next in Thread]