[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] Fix: Unused parameter
From: |
illusionoflife |
Subject: |
[Bug-wget] Fix: Unused parameter |
Date: |
Fri, 18 May 2012 22:23:09 +0400 |
User-agent: |
KMail/4.8.3 (Linux/3.3.5-1-ARCH; KDE/4.8.3; x86_64; ; ) |
Hello! Here is very little patch, that fix unused parameter warning and
make 2 functions to not take not-used parameter. I am very new to big
projects, so any feedback is very welcome.
I do not know, whether inline diff or attach prefered,
so I used linux style - inline.
diff --git a/src/convert.c b/src/convert.c
index 6cf6f27..e1c58e9 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -869,9 +869,9 @@ register_delete_file (const char *file)
/* Register that FILE is an HTML file that has been downloaded. */
void
-register_html (const char *url, const char *file)
+register_html (const char *file)
{
if (!downloaded_html_set)
downloaded_html_set = make_string_hash_table (0);
string_set_add (downloaded_html_set, file);
@@ -879,9 +879,9 @@ register_html (const char *url, const char *file)
/* Register that FILE is a CSS file that has been downloaded. */
void
-register_css (const char *url, const char *file)
+register_css (const char *file)
{
if (!downloaded_css_set)
downloaded_css_set = make_string_hash_table (0);
string_set_add (downloaded_css_set, file);
diff --git a/src/convert.h b/src/convert.h
index 1f034e5..cdd0a48 100644
--- a/src/convert.h
+++ b/src/convert.h
@@ -100,10 +100,10 @@ typedef enum
downloaded_file_t downloaded_file (downloaded_file_t, const char *);
void register_download (const char *, const char *);
void register_redirection (const char *, const char *);
-void register_html (const char *, const char *);
-void register_css (const char *, const char *);
+void register_html (const char *);
+void register_css (const char *);
void register_delete_file (const char *);
void convert_all_links (void);
void convert_cleanup (void);
diff --git a/src/retr.c b/src/retr.c
index 5f33c7a..8bc5442 100644
--- a/src/retr.c
+++ b/src/retr.c
@@ -931,12 +931,12 @@ retrieve_url (struct url * orig_parsed, const char
*origurl, char **file,
if (!opt.spider && redirection_count && 0 != strcmp (origurl, u->url))
register_redirection (origurl, u->url);
if (*dt & TEXTHTML)
- register_html (u->url, local_file);
+ register_html (local_file);
if (*dt & TEXTCSS)
- register_css (u->url, local_file);
+ register_css (local_file);
}
if (file)
*file = local_file ? local_file : NULL;
--
Best regards, illusionoflife
Contact me on address@hidden
or sip:address@hidden
Please, read rfc1855, if did not already.
signature.asc
Description: This is a digitally signed message part.
- [Bug-wget] Fix: Unused parameter,
illusionoflife <=