From c5a4dac5304bf814bf36702c007a8d798def9aa4 Mon Sep 17 00:00:00 2001 From: mtortonesi Date: Tue, 9 Jan 2007 07:55:12 -0800 Subject: [PATCH] [svn] Get rid of a gcc warning about strict-aliasing violation. --- src/ChangeLog | 5 +++++ src/init.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 76f88a12..fe141555 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2007-01-09 Mauro Tortonesi + + * 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 * ftp-basic.c (ftp_syst): Fixed segfault if response text is missing. diff --git a/src/init.c b/src/init.c index 32e9ea4f..35f9503a 100644 --- a/src/init.c +++ b/src/init.c @@ -1135,10 +1135,11 @@ cmd_spec_prefer_family (const char *com, const char *val, void *place_ignored) { "IPv6", prefer_ipv6 }, { "none", prefer_none }, }; - int ok = decode_string (val, choices, countof (choices), - (int *) &opt.prefer_family); + int prefer_family = prefer_ipv4; + int ok = decode_string (val, choices, countof (choices), &prefer_family); if (!ok) fprintf (stderr, _("%s: %s: Invalid value `%s'.\n"), exec_name, com, val); + opt.prefer_family = prefer_family; return ok; } -- 2.39.2