Source-Changes-HG archive

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

[src/trunk]: src/sys/sys Actually add __unused on the functions themselves in...



details:   https://anonhg.NetBSD.org/src/rev/e885d364b92a
branches:  trunk
changeset: 834657:e885d364b92a
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Aug 22 10:09:21 2018 +0000

description:
Actually add __unused on the functions themselves in case a .c file does
not use one function.

diffstat:

 sys/sys/asan.h |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 8711d290577d -r e885d364b92a sys/sys/asan.h
--- a/sys/sys/asan.h    Wed Aug 22 09:38:21 2018 +0000
+++ b/sys/sys/asan.h    Wed Aug 22 10:09:21 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asan.h,v 1.2 2018/08/22 09:38:21 maxv Exp $    */
+/*     $NetBSD: asan.h,v 1.3 2018/08/22 10:09:21 maxv Exp $    */
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -39,20 +39,20 @@
 void kasan_alloc(const void *, size_t, size_t);
 void kasan_free(const void *, size_t);
 #else
-static void __always_inline
+static void __always_inline __unused
 kasan_add_redzone(size_t *size __unused)
 {
        /* nothing */
 }
 
-static void __always_inline
+static void __always_inline __unused
 kasan_alloc(const void *addr __unused, size_t size __unused,
     size_t sz_with_redz __unused)
 {
        /* nothing */
 }
 
-static void __always_inline
+static void __always_inline __unused
 kasan_free(const void *addr __unused, size_t sz_with_redz __unused)
 {
        /* nothing */



Home | Main Index | Thread Index | Old Index