X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fquotearg.c;h=03fbfe79720a69f966b28d83adef00c261685e95;hb=6815bc73969d38c2226cf6e3366c1e4f4f756ba0;hp=5418f512bcff0a12cdbf021af4328da593ccdb13;hpb=8d8eda4eab3d2801251daf4eb31756c3595e2fc6;p=gnulib.git diff --git a/lib/quotearg.c b/lib/quotearg.c index 5418f512b..03fbfe797 100644 --- a/lib/quotearg.c +++ b/lib/quotearg.c @@ -1,7 +1,6 @@ /* quotearg.c - quote arguments for output - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, - 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1998-2002, 2004-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +17,13 @@ /* Written by Paul Eggert */ +/* Without this pragma, gcc 4.7.0 20111124 mistakenly suggests that + the quoting_options_from_style function might be candidate for + attribute 'pure' */ +#if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" +#endif + #include #include "quotearg.h" @@ -166,13 +172,13 @@ set_custom_quoting (struct quoting_options *o, } /* Return quoting options for STYLE, with no extra quoting. */ -static struct quoting_options +static struct quoting_options /* NOT PURE!! */ quoting_options_from_style (enum quoting_style style) { - struct quoting_options o; + struct quoting_options o = { 0 }; + if (style == custom_quoting_style) + abort (); o.style = style; - o.flags = 0; - memset (o.quote_these_too, 0, sizeof o.quote_these_too); return o; }