diff options
author | Petr Hosek <phosek@chromium.org> | 2017-12-21 20:51:16 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-12-21 20:51:16 +0000 |
commit | beb22912bbcd54decea94debe2892bf3489c33ce (patch) | |
tree | d2367c98c2350718995fa914a65da84d7bb62346 /include/sanitizer/allocator_interface.h | |
parent | 9090db487e55a83176aecb2810e3f5f2eee39cf1 (diff) |
[sanitizer] Make function declarations C-compatible
The public sanitizer headers are intended to be usable from either
C++ or C, but they declare no-argument functions with the syntax that
is not a proper prototype declaration in C. This goes unnoticed until
someone uses -Wsystem-headers.
Patch By: mcgrathr
Reviewers: phosek, vitalybuka
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D41475
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@321305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/sanitizer/allocator_interface.h')
-rw-r--r-- | include/sanitizer/allocator_interface.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/sanitizer/allocator_interface.h b/include/sanitizer/allocator_interface.h index 2d35804b3..89f328301 100644 --- a/include/sanitizer/allocator_interface.h +++ b/include/sanitizer/allocator_interface.h @@ -32,7 +32,7 @@ extern "C" { size_t __sanitizer_get_allocated_size(const volatile void *p); /* Number of bytes, allocated and not yet freed by the application. */ - size_t __sanitizer_get_current_allocated_bytes(); + size_t __sanitizer_get_current_allocated_bytes(void); /* Number of bytes, mmaped by the allocator to fulfill allocation requests. Generally, for request of X bytes, allocator can reserve and add to free @@ -40,17 +40,17 @@ extern "C" { All these chunks count toward the heap size. Currently, allocator never releases memory to OS (instead, it just puts freed chunks to free lists). */ - size_t __sanitizer_get_heap_size(); + size_t __sanitizer_get_heap_size(void); /* Number of bytes, mmaped by the allocator, which can be used to fulfill allocation requests. When a user program frees memory chunk, it can first fall into quarantine and will count toward __sanitizer_get_free_bytes() later. */ - size_t __sanitizer_get_free_bytes(); + size_t __sanitizer_get_free_bytes(void); /* Number of bytes in unmapped pages, that are released to OS. Currently, always returns 0. */ - size_t __sanitizer_get_unmapped_bytes(); + size_t __sanitizer_get_unmapped_bytes(void); /* Malloc hooks that may be optionally provided by user. __sanitizer_malloc_hook(ptr, size) is called immediately after @@ -81,7 +81,7 @@ extern "C" { resources in attempt to reduce process RSS. Currently available with ASan only. */ - void __sanitizer_purge_allocator(); + void __sanitizer_purge_allocator(void); #ifdef __cplusplus } // extern "C" |