Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 add warn_unused_result.



details:   https://anonhg.NetBSD.org/src/rev/c913eccac6b1
branches:  trunk
changeset: 446117:c913eccac6b1
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Nov 24 13:10:20 2018 +0000

description:
add warn_unused_result.

diffstat:

 usr.bin/xlint/lint1/cgram.y |  6 ++++--
 usr.bin/xlint/lint1/scan.l  |  5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diffs (62 lines):

diff -r 5b4fe68751cc -r c913eccac6b1 usr.bin/xlint/lint1/cgram.y
--- a/usr.bin/xlint/lint1/cgram.y       Sat Nov 24 13:08:10 2018 +0000
+++ b/usr.bin/xlint/lint1/cgram.y       Sat Nov 24 13:10:20 2018 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: cgram.y,v 1.98 2018/09/03 15:16:33 christos Exp $ */
+/* $NetBSD: cgram.y,v 1.99 2018/11/24 13:10:20 christos 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.98 2018/09/03 15:16:33 christos Exp $");
+__RCSID("$NetBSD: cgram.y,v 1.99 2018/11/24 13:10:20 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -234,6 +234,7 @@
 %token <y_type>                T_AT_UNUSED
 %token <y_type>                T_AT_USED
 %token <y_type>                T_AT_VISIBILITY
+%token <y_type>                T_AT_WARN_UNUSED_RESULT
 %token <y_type>                T_AT_WEAK
 
 %left  T_COMMA
@@ -561,6 +562,7 @@
        | T_AT_UNUSED {
                addused();
        }
+       | T_AT_WARN_UNUSED_RESULT
        | T_AT_WEAK
        | T_AT_VISIBILITY T_LPARN constant T_RPARN
        | T_QUAL {
diff -r 5b4fe68751cc -r c913eccac6b1 usr.bin/xlint/lint1/scan.l
--- a/usr.bin/xlint/lint1/scan.l        Sat Nov 24 13:08:10 2018 +0000
+++ b/usr.bin/xlint/lint1/scan.l        Sat Nov 24 13:10:20 2018 +0000
@@ -1,5 +1,5 @@
 %{
-/* $NetBSD: scan.l,v 1.84 2018/10/07 14:20:01 christos Exp $ */
+/* $NetBSD: scan.l,v 1.85 2018/11/24 13:10:20 christos 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.84 2018/10/07 14:20:01 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.85 2018/11/24 13:10:20 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -291,6 +291,7 @@
        { "visibility", T_AT_VISIBILITY,0,      0,      0,        0,0,1,1,5 },
        { "void",       T_TYPE,         0,      VOID,   0,        0,0,0,0,1 },
        { "volatile",   T_QUAL,         0,      0,      VOLATILE, 1,0,0,0,7 },
+       { "warn_unused_result", T_AT_WARN_UNUSED_RESULT, 0, 0, 0, 0,0,1,1,5 },
        { "weak",       T_AT_WEAK,      0,      0,      0,        0,0,1,1,5 },
        { "while",      T_WHILE,        0,      0,      0,        0,0,0,0,1 },
        { NULL,         0,              0,      0,      0,        0,0,0,0,0 }



Home | Main Index | Thread Index | Old Index