Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Define __NO_LEAKS in sys/cdefs.h



details:   https://anonhg.NetBSD.org/src/rev/642844b6046c
branches:  trunk
changeset: 454377:642844b6046c
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Sep 15 15:18:45 2019 +0000

description:
Define __NO_LEAKS in sys/cdefs.h

This preprocessor symbol is intended to be used with leak detecting
software, documenting leaks that are not important to be freed in the
default build version.

diffstat:

 sys/sys/cdefs.h |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r a6e9e5fc04ea -r 642844b6046c sys/sys/cdefs.h
--- a/sys/sys/cdefs.h   Sun Sep 15 15:16:30 2019 +0000
+++ b/sys/sys/cdefs.h   Sun Sep 15 15:18:45 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cdefs.h,v 1.142 2019/09/15 14:30:26 kamil Exp $        */
+/*     $NetBSD: cdefs.h,v 1.143 2019/09/15 15:18:45 kamil Exp $        */
 
 /* * Copyright (c) 1991, 1993
  *     The Regents of the University of California.  All rights reserved.
@@ -333,6 +333,11 @@
 #endif
 #endif
 
+#if defined(__COVERITY__) ||                                           \
+    __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
+#define        __NO_LEAKS
+#endif
+
 /*
  * To be used when an empty body is required like:
  *



Home | Main Index | Thread Index | Old Index