xref: /titanic_51/usr/src/lib/libsmbfs/smb/lgrep.awk (revision 16b7b96c6c25948273527a97ec0d3e2c803ad3f4)
102d09e03SGordon Ross#
202d09e03SGordon Ross# CDDL HEADER START
302d09e03SGordon Ross#
402d09e03SGordon Ross# The contents of this file are subject to the terms of the
502d09e03SGordon Ross# Common Development and Distribution License (the "License").
602d09e03SGordon Ross# You may not use this file except in compliance with the License.
702d09e03SGordon Ross#
802d09e03SGordon Ross# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
902d09e03SGordon Ross# or http://www.opensolaris.org/os/licensing.
1002d09e03SGordon Ross# See the License for the specific language governing permissions
1102d09e03SGordon Ross# and limitations under the License.
1202d09e03SGordon Ross#
1302d09e03SGordon Ross# When distributing Covered Code, include this CDDL HEADER in each
1402d09e03SGordon Ross# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1502d09e03SGordon Ross# If applicable, add the following below this CDDL HEADER, with the
1602d09e03SGordon Ross# fields enclosed by brackets "[]" replaced with your own identifying
1702d09e03SGordon Ross# information: Portions Copyright [yyyy] [name of copyright owner]
1802d09e03SGordon Ross#
1902d09e03SGordon Ross# CDDL HEADER END
2002d09e03SGordon Ross#
2102d09e03SGordon Ross
2202d09e03SGordon Ross#
2302d09e03SGordon Ross# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
2402d09e03SGordon Ross# Use is subject to license terms.
2502d09e03SGordon Ross#
26*16b7b96cSMilan Jurik# Copyright 2012 Milan Jurik. All rights reserved.
27*16b7b96cSMilan Jurik#
2802d09e03SGordon Ross
2902d09e03SGordon Ross# This is a "lint tail" that removes all the
3002d09e03SGordon Ross# uninteresting lines from our lint output.
3102d09e03SGordon Ross# It's nawk because sed doesn't do (a|b).
3202d09e03SGordon Ross# Also comments are easier here.
3302d09e03SGordon Ross
34a7575d5dSGordon Ross# There's no lintlib for krb5 yet (CR 6911968)
35a7575d5dSGordon Ross/: Warning: -lkrb5 not found/			{ next; }
36*16b7b96cSMilan Jurik/: Warning: library -lkrb5 not found/		{ next; }
37a7575d5dSGordon Ross
38a7575d5dSGordon Ross# Kill noise from xti.h with _XOPEN_SOURCE vs not. (CR 6911717)
39a7575d5dSGordon Ross/: _xti_.* .E_INCONS_ARG_DECL2./		{ next; }
40a7575d5dSGordon Ross/: _xti_.* .E_INCONS_ARG_USED2./		{ next; }
41a7575d5dSGordon Ross/: _xti_.* .E_INCONS_VAL_TYPE_DECL2./		{ next; }
42a7575d5dSGordon Ross
4305cffdd1SGordon Ross# This is third-party code we'd rather not "fix"
4405cffdd1SGordon Ross/\/spnego.c.* .E_STMT_NOT_REACHED./		{ next; }
4505cffdd1SGordon Ross
4602d09e03SGordon Ross# The mb_put/md_get functions are intentionally used both
4702d09e03SGordon Ross# with and without return value checks.  Not a concern.
4802d09e03SGordon Ross/: mb_put_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
4902d09e03SGordon Ross/: md_get_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
5002d09e03SGordon Ross
5102d09e03SGordon Ross# The rc_get* functions clear the out arg even on failure,
5202d09e03SGordon Ross# so most callers don't need to check the return value.
5302d09e03SGordon Ross/: rc_get[a-z]* .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
5402d09e03SGordon Ross
5502d09e03SGordon Ross# These have uninteresting return values, usually ignored.
5602d09e03SGordon Ross/: (n|sm)b_ctx_readrcsection .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
5702d09e03SGordon Ross/: nls_str_(lower|upper) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
5802d09e03SGordon Ross/: rc_(close|freesect) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
5902d09e03SGordon Ross
6002d09e03SGordon Ross# Other functions for which we often ignore return values.
6102d09e03SGordon Ross/: [a-z]*close .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
6202d09e03SGordon Ross/: [a-z]*flush .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
6302d09e03SGordon Ross/: [a-z]*printf .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
6402d09e03SGordon Ross/: mem(cpy|move|set) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
6502d09e03SGordon Ross/: mutex_.* .E_FUNC_RET_[A-Z]*_IGNOR/		{ next; }
6602d09e03SGordon Ross/: str[ln]?(cat|cpy) .E_FUNC_RET_[A-Z]*_IGNOR/	{ next; }
6702d09e03SGordon Ross
6802d09e03SGordon Ross{ print; }
69