From: Ben Pfaff Date: Sun, 31 Jul 2005 06:06:50 +0000 (+0000) Subject: (var_is_valid_name) Fix three msg() bugs found by -Wformat. X-Git-Tag: v0.4.0~11 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc471417f877c476728feb7ebb34d0c5195f67e8;p=pspp-builds.git (var_is_valid_name) Fix three msg() bugs found by -Wformat. --- diff --git a/src/ChangeLog b/src/ChangeLog index 7dec878d..cd4f47b9 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +Sat Jul 30 23:05:33 2005 Ben Pfaff + + * vars-atr.c: (var_is_valid_name) Fix three msg() bugs found by + -Wformat. + Sat Jul 30 22:58:33 2005 Ben Pfaff * rank.q: (parse_rank_function) Fix msg() bug found by -Wformat. diff --git a/src/vars-atr.c b/src/vars-atr.c index 356f51a4..70669837 100644 --- a/src/vars-atr.c +++ b/src/vars-atr.c @@ -263,7 +263,7 @@ var_is_valid_name (const char *name, bool issue_error) { if (issue_error) msg (SE, _("Variable name %s exceeds %d-character limit."), - (int) LONG_NAME_LEN); + name, (int) LONG_NAME_LEN); return false; } @@ -273,7 +273,7 @@ var_is_valid_name (const char *name, bool issue_error) if (issue_error) msg (SE, _("Character `%c' (in %s) may not appear in " "a variable name."), - name); + name[i], name); return false; } @@ -281,7 +281,8 @@ var_is_valid_name (const char *name, bool issue_error) { if (issue_error) msg (SE, _("Character `%c' (in %s), may not appear " - "as the first character in a variable name."), name); + "as the first character in a variable name."), + name[0], name); return false; }