Silent compiler warning.

This commit is contained in:
Giuseppe Scrivano 2011-03-21 13:14:20 +01:00
parent 910ec4641e
commit 024683705d
3 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2011-03-21 Giuseppe Scrivano <gscrivano@gnu.org>
* iri.h: Declare `dummy_iri' as extern not static.
* main.c [!ENABLE_IRI]: Define `dummy_iri'.
(main) [!ENABLE_IRI]: Initialize `dummy_iri'.
2011-03-11 Giuseppe Scrivano <gscrivano@gnu.org>
* ftp.c (getftp): Fix some memory leaks.

View File

@ -54,7 +54,7 @@ void set_content_encoding (struct iri *i, char *charset);
#else /* ENABLE_IRI */
static struct iri dummy_iri;
extern struct iri dummy_iri;
#define parse_charset(str) NULL
#define find_locale() NULL

View File

@ -68,6 +68,10 @@ as that of the covered work. */
# define PATH_SEPARATOR '/'
#endif
#ifndef ENABLE_IRI
struct iri dummy_iri;
#endif
struct options opt;
/* defined in version.c */
@ -1181,6 +1185,7 @@ for details.\n\n"));
opt.encoding_remote = NULL;
}
#else
memset (&dummy_iri, 0, sizeof (dummy_iri));
if (opt.enable_iri || opt.locale || opt.encoding_remote)
{
/* sXXXav : be more specific... */