Add ifdefs to eliminate false positives on lgtm, same as coverity.

This commit is contained in:
maxv 2019-09-20 13:38:00 +00:00
parent 43bc9355ea
commit b0bea7daa3
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: libkern.h,v 1.131 2019/09/07 09:46:07 maxv Exp $ */
/* $NetBSD: libkern.h,v 1.132 2019/09/20 13:38:00 maxv Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -336,7 +336,7 @@ tolower(int ch)
* *fp does not match the type of struct bar::b_foo.
* We skip the validation for coverity runs to avoid warnings.
*/
#ifdef __COVERITY__
#if defined(__COVERITY__) || defined(__LGTM_BOT__)
#define __validate_container_of(PTR, TYPE, FIELD) 0
#define __validate_const_container_of(PTR, TYPE, FIELD) 0
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: pslist.h,v 1.5 2018/04/19 21:19:07 christos Exp $ */
/* $NetBSD: pslist.h,v 1.6 2019/09/20 13:38:00 maxv Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@ -279,7 +279,7 @@ _pslist_reader_next_container(const struct pslist_entry *entry,
* Type-safe macros for convenience.
*/
#ifdef __COVERITY__
#if defined(__COVERITY__) || defined(__LGTM_BOT__)
#define _PSLIST_VALIDATE_PTRS(P, Q) 0
#define _PSLIST_VALIDATE_CONTAINER(P, T, F) 0
#else