Module Name: src Committed By: rillig Date: Sun Jan 31 11:23:02 UTC 2021
Modified Files: src/tests/usr.bin/xlint/lint1: msg_001.c msg_001.exp msg_019.c msg_019.exp msg_035.exp src/usr.bin/xlint/lint1: cgram.y decl.c err.c Log Message: lint: add quotes to messages 1 and 19 To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/msg_001.c cvs rdiff -u -r1.2 -r1.3 src/tests/usr.bin/xlint/lint1/msg_001.exp \ src/tests/usr.bin/xlint/lint1/msg_019.c \ src/tests/usr.bin/xlint/lint1/msg_019.exp cvs rdiff -u -r1.6 -r1.7 src/tests/usr.bin/xlint/lint1/msg_035.exp cvs rdiff -u -r1.158 -r1.159 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.132 -r1.133 src/usr.bin/xlint/lint1/decl.c cvs rdiff -u -r1.73 -r1.74 src/usr.bin/xlint/lint1/err.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/usr.bin/xlint/lint1/msg_001.c diff -u src/tests/usr.bin/xlint/lint1/msg_001.c:1.3 src/tests/usr.bin/xlint/lint1/msg_001.c:1.4 --- src/tests/usr.bin/xlint/lint1/msg_001.c:1.3 Sun Jan 31 11:12:07 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.c Sun Jan 31 11:23:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_001.c,v 1.3 2021/01/31 11:12:07 rillig Exp $ */ +/* $NetBSD: msg_001.c,v 1.4 2021/01/31 11:23:01 rillig Exp $ */ # 3 "msg_001.c" -// Test for message: old style declaration; add int [1] +// Test for message: old style declaration; add 'int' [1] old_style = 1; /* expect: [1] */ Index: src/tests/usr.bin/xlint/lint1/msg_001.exp diff -u src/tests/usr.bin/xlint/lint1/msg_001.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_001.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_001.exp:1.2 Sat Jan 2 18:06:01 2021 +++ src/tests/usr.bin/xlint/lint1/msg_001.exp Sun Jan 31 11:23:01 2021 @@ -1 +1 @@ -msg_001.c(6): warning: old style declaration; add int [1] +msg_001.c(6): warning: old style declaration; add 'int' [1] Index: src/tests/usr.bin/xlint/lint1/msg_019.c diff -u src/tests/usr.bin/xlint/lint1/msg_019.c:1.2 src/tests/usr.bin/xlint/lint1/msg_019.c:1.3 --- src/tests/usr.bin/xlint/lint1/msg_019.c:1.2 Sun Jan 31 09:48:47 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.c Sun Jan 31 11:23:01 2021 @@ -1,7 +1,7 @@ -/* $NetBSD: msg_019.c,v 1.2 2021/01/31 09:48:47 rillig Exp $ */ +/* $NetBSD: msg_019.c,v 1.3 2021/01/31 11:23:01 rillig Exp $ */ # 3 "msg_019.c" -// Test for message: void type for %s [19] +// Test for message: void type for '%s' [19] void global_variable; /* expect: 19 */ Index: src/tests/usr.bin/xlint/lint1/msg_019.exp diff -u src/tests/usr.bin/xlint/lint1/msg_019.exp:1.2 src/tests/usr.bin/xlint/lint1/msg_019.exp:1.3 --- src/tests/usr.bin/xlint/lint1/msg_019.exp:1.2 Sun Jan 31 09:48:47 2021 +++ src/tests/usr.bin/xlint/lint1/msg_019.exp Sun Jan 31 11:23:01 2021 @@ -1,6 +1,6 @@ -msg_019.c(6): void type for global_variable [19] -msg_019.c(8): void type for unit_variable [19] +msg_019.c(6): void type for 'global_variable' [19] +msg_019.c(8): void type for 'unit_variable' [19] msg_019.c(11): void parameter cannot have name: parameter [61] -msg_019.c(13): void type for local_variable [19] +msg_019.c(13): void type for 'local_variable' [19] msg_019.c(11): warning: argument parameter unused in function function [231] msg_019.c(8): warning: static variable unit_variable unused [226] Index: src/tests/usr.bin/xlint/lint1/msg_035.exp diff -u src/tests/usr.bin/xlint/lint1/msg_035.exp:1.6 src/tests/usr.bin/xlint/lint1/msg_035.exp:1.7 --- src/tests/usr.bin/xlint/lint1/msg_035.exp:1.6 Sun Jan 3 16:59:59 2021 +++ src/tests/usr.bin/xlint/lint1/msg_035.exp Sun Jan 31 11:23:01 2021 @@ -5,7 +5,7 @@ msg_035.c(44): warning: illegal bit-fiel msg_035.c(47): warning: illegal bit-field type [35] msg_035.c(48): warning: illegal bit-field type [35] msg_035.c(49): warning: illegal bit-field type [35] -msg_035.c(50): void type for void_flag [19] +msg_035.c(50): void type for 'void_flag' [19] msg_035.c(50): zero size bit-field [37] msg_035.c(51): warning: illegal bit-field type [35] msg_035.c(52): warning: illegal bit-field type [35] Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.158 src/usr.bin/xlint/lint1/cgram.y:1.159 --- src/usr.bin/xlint/lint1/cgram.y:1.158 Sun Jan 31 09:26:27 2021 +++ src/usr.bin/xlint/lint1/cgram.y Sun Jan 31 11:23:01 2021 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.158 2021/01/31 09:26:27 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.159 2021/01/31 11:23:01 rillig Exp $"); #endif #include <limits.h> @@ -376,10 +376,10 @@ data_def: } | clrtyp deftyp notype_init_decls T_SEMI { if (sflag) { - /* old style declaration; add int */ + /* old style declaration; add 'int' */ error(1); } else if (!tflag) { - /* old style declaration; add int */ + /* old style declaration; add 'int' */ warning(1); } } Index: src/usr.bin/xlint/lint1/decl.c diff -u src/usr.bin/xlint/lint1/decl.c:1.132 src/usr.bin/xlint/lint1/decl.c:1.133 --- src/usr.bin/xlint/lint1/decl.c:1.132 Sat Jan 30 18:16:45 2021 +++ src/usr.bin/xlint/lint1/decl.c Sun Jan 31 11:23:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.132 2021/01/30 18:16:45 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.133 2021/01/31 11:23:01 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.132 2021/01/30 18:16:45 rillig Exp $"); +__RCSID("$NetBSD: decl.c,v 1.133 2021/01/31 11:23:01 rillig Exp $"); #endif #include <sys/param.h> @@ -1056,7 +1056,7 @@ check_type(sym_t *sym) } else if (dcs->d_ctx == ABSTRACT) { /* ok */ } else if (sym->s_scl != TYPEDEF) { - /* void type for %s */ + /* void type for '%s' */ error(19, sym->s_name); *tpp = gettyp(INT); } Index: src/usr.bin/xlint/lint1/err.c diff -u src/usr.bin/xlint/lint1/err.c:1.73 src/usr.bin/xlint/lint1/err.c:1.74 --- src/usr.bin/xlint/lint1/err.c:1.73 Sun Jan 31 09:26:27 2021 +++ src/usr.bin/xlint/lint1/err.c Sun Jan 31 11:23:01 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.73 2021/01/31 09:26:27 rillig Exp $ */ +/* $NetBSD: err.c,v 1.74 2021/01/31 11:23:01 rillig Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -37,7 +37,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.73 2021/01/31 09:26:27 rillig Exp $"); +__RCSID("$NetBSD: err.c,v 1.74 2021/01/31 11:23:01 rillig Exp $"); #endif #include <sys/types.h> @@ -60,7 +60,7 @@ static void vwarning(int, va_list); const char *msgs[] = { "empty declaration", /* 0 */ - "old style declaration; add int", /* 1 */ + "old style declaration; add 'int'", /* 1 */ "empty declaration", /* 2 */ "'%s' declared in argument declaration list", /* 3 */ "illegal type combination", /* 4 */ @@ -78,7 +78,7 @@ const char *msgs[] = { "array of function is illegal", /* 16 */ "null dimension", /* 17 */ "illegal use of 'void'", /* 18 */ - "void type for %s", /* 19 */ + "void type for '%s'", /* 19 */ "negative array dimension (%d)", /* 20 */ "redeclaration of formal parameter %s", /* 21 */ "incomplete or misplaced function definition", /* 22 */