1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Get rid of a gcc warning about strict-aliasing violation.

This commit is contained in:
mtortonesi 2007-01-09 07:55:12 -08:00
parent bd7f4ef701
commit c5a4dac530
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2007-01-09 Mauro Tortonesi <mauro@ferrara.linux.it>
* init.c (cmd_spec_prefer_family): Small fix to get rid of a gcc
warning about strict-aliasing violation.
2007-01-09 Steven M. Schweda <sms@antinode.org> 2007-01-09 Steven M. Schweda <sms@antinode.org>
* ftp-basic.c (ftp_syst): Fixed segfault if response text is missing. * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing.

View File

@ -1135,10 +1135,11 @@ cmd_spec_prefer_family (const char *com, const char *val, void *place_ignored)
{ "IPv6", prefer_ipv6 }, { "IPv6", prefer_ipv6 },
{ "none", prefer_none }, { "none", prefer_none },
}; };
int ok = decode_string (val, choices, countof (choices), int prefer_family = prefer_ipv4;
(int *) &opt.prefer_family); int ok = decode_string (val, choices, countof (choices), &prefer_family);
if (!ok) if (!ok)
fprintf (stderr, _("%s: %s: Invalid value `%s'.\n"), exec_name, com, val); fprintf (stderr, _("%s: %s: Invalid value `%s'.\n"), exec_name, com, val);
opt.prefer_family = prefer_family;
return ok; return ok;
} }