-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I noticed on cygwin that I was getting a warning for buf being declared at line argp-help.c:1895 but not used. This patch also fixes a lot of trailing whitespace; let me know if you don't want whitespace patches.
2005-12-10 Eric Blake <[EMAIL PROTECTED]> * argp-help.c (__argp_failure) [USE_IN_LIBIO || _LIBC || HAV_DECL_STRERROR_R]: Only declare buf when used, to avoid compiler warning. - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDm1K084KuGfSFAYARAqc/AJ41psc8/JevuBniw4BZjO/+JPmu0gCeL24V y97DmN76ILAjfQywzOFWGOU= =dFcp -----END PGP SIGNATURE-----
Index: lib/argp-help.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/argp-help.c,v retrieving revision 1.20 diff -u -p -r1.20 argp-help.c --- lib/argp-help.c 10 Dec 2005 21:37:29 -0000 1.20 +++ lib/argp-help.c 10 Dec 2005 22:03:41 -0000 @@ -90,11 +90,11 @@ struct uparams int dup_args_note; /* Various output columns. */ - int short_opt_col; /* column in which short options start */ - int long_opt_col; /* column in which long options start */ + int short_opt_col; /* column in which short options start */ + int long_opt_col; /* column in which long options start */ int doc_opt_col; /* column in which doc options start */ int opt_doc_col; /* column in which option text starts */ - int header_col; /* column in which group headers are printed */ + int header_col; /* column in which group headers are printed */ int usage_indent; /* indentation of wrapped usage lines */ int rmargin; /* right margin used for wrapping */ @@ -162,7 +162,7 @@ fill_in_uparams (const struct argp_state { const char *var = getenv ("ARGP_HELP_FMT"); struct uparams new_params = uparams; - + #define SKIPWS(p) do { while (isspace (*p)) p++; } while (0); if (var) @@ -171,7 +171,7 @@ fill_in_uparams (const struct argp_state while (*var) { SKIPWS (var); - + if (isalpha (*var)) { size_t var_len; @@ -182,9 +182,9 @@ fill_in_uparams (const struct argp_state while (isalnum (*arg) || *arg == '-' || *arg == '_') arg++; var_len = arg - var; - + SKIPWS (arg); - + if (*arg == '\0' || *arg == ',') unspec = 1; else if (*arg == '=') @@ -192,7 +192,7 @@ fill_in_uparams (const struct argp_state arg++; SKIPWS (arg); } - + if (unspec) { if (var[0] == 'n' && var[1] == 'o' && var[2] == '-') @@ -211,7 +211,7 @@ fill_in_uparams (const struct argp_state arg++; SKIPWS (arg); } - + for (un = uparam_names; un->name; un++) if (strlen (un->name) == var_len && strncmp (var, un->name, var_len) == 0) @@ -1686,7 +1686,7 @@ Try `%s --help' or `%s --usage' for more __argp_fmtstream_putc (fs, '\n'); __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "Report bugs to %s.\n"), - argp_program_bug_address); + argp_program_bug_address); anything = 1; } @@ -1722,7 +1722,7 @@ __argp_base_name (char *name) ; return p; } - + #if ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME) char * __argp_short_program_name (void) @@ -1892,7 +1892,9 @@ __argp_failure (const struct argp_state if (errnum) { +#if defined USE_IN_LIBIO || _LIBC || HAVE_DECL_STRERROR_R char buf[200]; +#endif #ifdef USE_IN_LIBIO if (_IO_fwide (stream, 0) > 0)
_______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib