From: Ben Pfaff Date: Sun, 31 Jul 2005 05:47:13 +0000 (+0000) Subject: (check_common_specifier) Fix msg() bug found by -Wformat. X-Git-Tag: v0.4.0~18 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=548bb686a5d9843eea4a49d3bb9f62a29f86e116;p=pspp-builds.git (check_common_specifier) Fix msg() bug found by -Wformat. (check_output_specifier) Ditto. --- diff --git a/src/ChangeLog b/src/ChangeLog index b50b37e5..aa4c5304 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +Sat Jul 30 22:46:10 2005 Ben Pfaff + + * format.c: (check_common_specifier) Fix msg() bug found by + -Wformat. + (check_output_specifier) Ditto. + Sat Jul 30 22:43:57 2005 Ben Pfaff * file-handle.q: (cmd_file_handle) Fix msg() bug found by diff --git a/src/format.c b/src/format.c index 5e06ab22..217aa523 100644 --- a/src/format.c +++ b/src/format.c @@ -129,8 +129,8 @@ check_common_specifier (const struct fmt_spec *spec, bool emit_error) { if (emit_error) msg (SE, _("Format %s specifies an odd width %d, but " - "format %s requires an even width."), - str, spec->w, f->name, f->Imin_w, f->Imax_w); + "an even width is required."), + str, spec->w); return false; } if (f->n_args > 1 && (spec->d < 0 || spec->d > 16)) @@ -213,7 +213,7 @@ check_output_specifier (const struct fmt_spec *spec, int emit_error) "many decimal places as the field width, which " "fails to allow space for a decimal point. " "Try %s%d.%d instead."), - str, f->name, f->name, spec->d + 1, spec->d); + str, f->name, spec->d + 1, spec->d); return 0; } return 1;