Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Add ifdefs to eliminate false positives on lgtm, sam...



details:   https://anonhg.NetBSD.org/src/rev/67a1cdde1c4e
branches:  trunk
changeset: 1003551:67a1cdde1c4e
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Sep 20 13:38:00 2019 +0000

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

diffstat:

 sys/lib/libkern/libkern.h |  4 ++--
 sys/sys/pslist.h          |  4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 4c5e4d516c0a -r 67a1cdde1c4e sys/lib/libkern/libkern.h
--- a/sys/lib/libkern/libkern.h Fri Sep 20 13:29:31 2019 +0000
+++ b/sys/lib/libkern/libkern.h Fri Sep 20 13:38:00 2019 +0000
@@ -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 @@
  * *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
diff -r 4c5e4d516c0a -r 67a1cdde1c4e sys/sys/pslist.h
--- a/sys/sys/pslist.h  Fri Sep 20 13:29:31 2019 +0000
+++ b/sys/sys/pslist.h  Fri Sep 20 13:38:00 2019 +0000
@@ -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 @@
  * 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



Home | Main Index | Thread Index | Old Index