[Top][All Lists]

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

Re: [Bug-wget] Fix various compiler warnings

From: Tim Rühsen
Subject: Re: [Bug-wget] Fix various compiler warnings
Date: Sat, 22 Nov 2014 11:50:05 +0100
User-agent: KMail/4.14.2 (Linux/3.16.0-4-amd64; KDE/4.14.2; x86_64; ; )

Am Samstag, 22. November 2014, 14:52:14 schrieb Darshit Shah:
> This is a new set pf patches to eliminate some more compiler warnings.
> [PATCH 1/8] Mark unused paramter in utils.c
> [PATCH 2/8] Add extern declaration for version.c strings
> [PATCH 3/8] Fix missing extern declaration error for build_info.pl
> [PATCH 4/8] Declare extern numurls in common header
> [PATCH 5/8] Make extern declaration for program_name
> [PATCH 6/8] Add extern declaration for program_arsgstring
> [PATCH 7/8] Remove defensive assert in cookies.c
> [PATCH 8/8] Supplement logical assumption assert with error message
> Patches 1 through 6 eliminate compiler warnings. I've tested these patches
> in a fresh clone of Wget, and they seem to work without any of the issues
> that the patches I sent yesterday were suffering from.
> In patch 7, I've eliminated what looked like a purely defensive assert and
> added a conditional to check and print an error message. In case the cookie
> is not found, Wget can continue working.
> In patch 8 however, the assert is for identifying a logical issue in the
> code. Hence, I've retained it. And added a call to abort() after the error
> messages are printed out.
> Patches 7 and 8 are mostly meant to be examples of how we could handle the
> various assert statements in the codebase.

Thanks Darshit.

After applying your patch I got:

host.c: In function 'address_list_set_faulty':
host.c:156:7: warning: format '%s' expects argument of type 'char *', but 
argument 4 has type 'int' [-Wformat=]
       logprintf (LOG_ALWAYS, "index: %d\nal->faulty: %s\n", index, al-

It's abvious:
+      logprintf (LOG_ALWAYS, "index: %d\nal->faulty: %s\n", index, al-

Please feel free to push it after changing the above.


Attachment: signature.asc
Description: This is a digitally signed message part.

reply via email to

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