Module Name: src Committed By: rillig Date: Mon Dec 28 19:47:42 UTC 2020
Modified Files: src/usr.bin/xlint/lint1: cgram.y mkops scan.l src/usr.bin/xlint/lint2: chk.c Log Message: lint: remove trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/usr.bin/xlint/lint1/cgram.y cvs rdiff -u -r1.8 -r1.9 src/usr.bin/xlint/lint1/mkops cvs rdiff -u -r1.94 -r1.95 src/usr.bin/xlint/lint1/scan.l cvs rdiff -u -r1.25 -r1.26 src/usr.bin/xlint/lint2/chk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/xlint/lint1/cgram.y diff -u src/usr.bin/xlint/lint1/cgram.y:1.108 src/usr.bin/xlint/lint1/cgram.y:1.109 --- src/usr.bin/xlint/lint1/cgram.y:1.108 Mon Dec 28 19:07:43 2020 +++ src/usr.bin/xlint/lint1/cgram.y Mon Dec 28 19:47:42 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.108 2020/12/28 19:07:43 rillig Exp $ */ +/* $NetBSD: cgram.y,v 1.109 2020/12/28 19:47:42 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.108 2020/12/28 19:07:43 rillig Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.109 2020/12/28 19:47:42 rillig Exp $"); #endif #include <limits.h> @@ -534,7 +534,7 @@ type_attribute_bounded_type: type_attribute_spec: - /* empty */ + /* empty */ | T_AT_DEPRECATED T_LPARN string T_RPARN | T_AT_DEPRECATED | T_AT_ALIGNED T_LPARN constant T_RPARN @@ -552,9 +552,9 @@ type_attribute_spec: | T_AT_PCS T_LPARN string T_RPARN | T_AT_SECTION T_LPARN string T_RPARN | T_AT_TLS_MODEL T_LPARN string T_RPARN - | T_AT_ALIGNED - | T_AT_CONSTRUCTOR - | T_AT_DESTRUCTOR + | T_AT_ALIGNED + | T_AT_CONSTRUCTOR + | T_AT_DESTRUCTOR | T_AT_MALLOC | T_AT_MAY_ALIAS | T_AT_NO_INSTRUMENT_FUNCTION @@ -582,7 +582,7 @@ type_attribute_spec: | T_AT_WEAK | T_AT_VISIBILITY T_LPARN constant T_RPARN | T_QUAL { - if ($1 != CONST) + if ($1 != CONST) yyerror("Bad attribute"); } ; @@ -1336,7 +1336,7 @@ init_expr_list: | init_expr_list T_COMMA init_assign_expr ; -lorange: +lorange: constant T_ELLIPSE { $$.lo = toicon($1, 1); } @@ -1551,7 +1551,7 @@ expr_stmnt: ; /* - * The following two productions are used to implement + * The following two productions are used to implement * ({ [[decl-list] stmt-list] }). * XXX: This is not well tested. */ @@ -1625,7 +1625,7 @@ switch_expr: association: type_name T_COLON expr - | T_DEFAULT T_COLON expr + | T_DEFAULT T_COLON expr ; association_list: Index: src/usr.bin/xlint/lint1/mkops diff -u src/usr.bin/xlint/lint1/mkops:1.8 src/usr.bin/xlint/lint1/mkops:1.9 --- src/usr.bin/xlint/lint1/mkops:1.8 Mon Feb 7 23:56:18 2011 +++ src/usr.bin/xlint/lint1/mkops Mon Dec 28 19:47:42 2020 @@ -1,5 +1,5 @@ #!/bin/sh - -# $NetBSD: mkops,v 1.8 2011/02/07 23:56:18 christos Exp $ +# $NetBSD: mkops,v 1.9 2020/12/28 19:47:42 rillig Exp $ # # Copyright (c) 2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -99,7 +99,7 @@ BEGIN { m = $3; act = 1; } - printf("\t{ /* %s */\t{ %s \"%s\" }, %d },\n", $2, m, $1, act); + printf("\t{ /* %s */\t{ %s \"%s\" }, %d },\n", $2, m, $1, act); } } @@ -110,7 +110,7 @@ END { printf("} op_t;\n"); printf("const char *getopname(op_t);\n"); printf("void initmtab(void);\n"); - } + } if (v == "c") { printf("};\n"); printf("const char *\n"); Index: src/usr.bin/xlint/lint1/scan.l diff -u src/usr.bin/xlint/lint1/scan.l:1.94 src/usr.bin/xlint/lint1/scan.l:1.95 --- src/usr.bin/xlint/lint1/scan.l:1.94 Mon Dec 28 19:07:43 2020 +++ src/usr.bin/xlint/lint1/scan.l Mon Dec 28 19:47:42 2020 @@ -1,5 +1,5 @@ %{ -/* $NetBSD: scan.l,v 1.94 2020/12/28 19:07:43 rillig Exp $ */ +/* $NetBSD: scan.l,v 1.95 2020/12/28 19:47:42 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: scan.l,v 1.94 2020/12/28 19:07:43 rillig Exp $"); +__RCSID("$NetBSD: scan.l,v 1.95 2020/12/28 19:47:42 rillig Exp $"); #endif #include <ctype.h> @@ -355,7 +355,7 @@ addkw(struct kwtab *kw, int deco) if (name == NULL) err(1, "Can't init symbol table"); - + sym = getblk(sizeof (sym_t)); sym->s_name = name; sym->s_keyw = kw; @@ -392,8 +392,8 @@ initscan(void) continue; if (kw->kw_gcc && !gflag) continue; - addkw(kw, 1); - addkw(kw, 2); + addkw(kw, 1); + addkw(kw, 2); addkw(kw, 4); } @@ -829,7 +829,7 @@ fcon(void) typ = LDOUBLE; len--; } else { - if (c == 'd' || c == 'D') + if (c == 'd' || c == 'D') len--; typ = DOUBLE; } Index: src/usr.bin/xlint/lint2/chk.c diff -u src/usr.bin/xlint/lint2/chk.c:1.25 src/usr.bin/xlint/lint2/chk.c:1.26 --- src/usr.bin/xlint/lint2/chk.c:1.25 Mon Dec 28 19:07:43 2020 +++ src/usr.bin/xlint/lint2/chk.c Mon Dec 28 19:47:42 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: chk.c,v 1.25 2020/12/28 19:07:43 rillig Exp $ */ +/* $NetBSD: chk.c,v 1.26 2020/12/28 19:47:42 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: chk.c,v 1.25 2020/12/28 19:07:43 rillig Exp $"); +__RCSID("$NetBSD: chk.c,v 1.26 2020/12/28 19:47:42 rillig Exp $"); #endif #include <ctype.h> @@ -590,7 +590,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym pos1 = xstrdup(mkpos(pos1p)); /* %s, arg %d used inconsistently\t%s[%s] :: %s[%s] */ - msg(6, hte->h_name, n, pos1, + msg(6, hte->h_name, n, pos1, tyname(tyname1, sizeof(tyname1), arg1), mkpos(&call->f_pos), tyname(tyname2, sizeof(tyname2), arg2));