| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: asan.h,v 1.2 2018/08/22 09:38:21 maxv Exp $ */ | | 1 | /* $NetBSD: asan.h,v 1.3 2018/08/22 10:09:21 maxv Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2018 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2018 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Maxime Villard. | | 8 | * by Maxime Villard. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -29,34 +29,34 @@ | | | @@ -29,34 +29,34 @@ |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #ifndef _SYS_ASAN_H_ | | 32 | #ifndef _SYS_ASAN_H_ |
33 | #define _SYS_ASAN_H_ | | 33 | #define _SYS_ASAN_H_ |
34 | | | 34 | |
35 | #include <sys/types.h> | | 35 | #include <sys/types.h> |
36 | | | 36 | |
37 | #ifdef KASAN | | 37 | #ifdef KASAN |
38 | void kasan_add_redzone(size_t *); | | 38 | void kasan_add_redzone(size_t *); |
39 | void kasan_alloc(const void *, size_t, size_t); | | 39 | void kasan_alloc(const void *, size_t, size_t); |
40 | void kasan_free(const void *, size_t); | | 40 | void kasan_free(const void *, size_t); |
41 | #else | | 41 | #else |
42 | static void __always_inline | | 42 | static void __always_inline __unused |
43 | kasan_add_redzone(size_t *size __unused) | | 43 | kasan_add_redzone(size_t *size __unused) |
44 | { | | 44 | { |
45 | /* nothing */ | | 45 | /* nothing */ |
46 | } | | 46 | } |
47 | | | 47 | |
48 | static void __always_inline | | 48 | static void __always_inline __unused |
49 | kasan_alloc(const void *addr __unused, size_t size __unused, | | 49 | kasan_alloc(const void *addr __unused, size_t size __unused, |
50 | size_t sz_with_redz __unused) | | 50 | size_t sz_with_redz __unused) |
51 | { | | 51 | { |
52 | /* nothing */ | | 52 | /* nothing */ |
53 | } | | 53 | } |
54 | | | 54 | |
55 | static void __always_inline | | 55 | static void __always_inline __unused |
56 | kasan_free(const void *addr __unused, size_t sz_with_redz __unused) | | 56 | kasan_free(const void *addr __unused, size_t sz_with_redz __unused) |
57 | { | | 57 | { |
58 | /* nothing */ | | 58 | /* nothing */ |
59 | } | | 59 | } |
60 | #endif | | 60 | #endif |
61 | | | 61 | |
62 | #endif /* !_SYS_ASAN_H_ */ | | 62 | #endif /* !_SYS_ASAN_H_ */ |