bug-wget
[Top][All Lists]
Advanced

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

[Bug-wget] Fix various compiler warnings


From: Darshit Shah
Subject: [Bug-wget] Fix various compiler warnings
Date: Sat, 22 Nov 2014 14:52:14 +0530

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.



reply via email to

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