diff options
author | Matt Turner <mattst88@gmail.com> | 2024-04-16 13:44:21 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-16 19:18:55 +0000 |
commit | 41548e8322062540cce4670c2b7a8ef75b130d82 (patch) | |
tree | 60e77e370f32209eecb1d989b1827f7a0570c7c1 | |
parent | 9329cf7611284fe7e68a67aef852c76ad30e9ebd (diff) |
test: Add prototype for Xmureallocarray to silence warning
In file included from reallocarray.c:50:
../src/reallocarray.c:35:1: warning: no previous prototype for ‘Xmureallocarray’ [-Wmissing-prototypes]
35 | Xmureallocarray(void *optr, size_t nmemb, size_t size)
| ^~~~~~~~~~~~~~~
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libxmu/-/merge_requests/14>
-rw-r--r-- | test/reallocarray.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/reallocarray.c b/test/reallocarray.c index 878d05e..8a41905 100644 --- a/test/reallocarray.c +++ b/test/reallocarray.c @@ -42,6 +42,9 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Walloc-size-larger-than=" +/* to silence missing prototype warning */ +void *Xmureallocarray(void *optr, size_t nmemb, size_t size); + /* * To ensure we're testing our Xmureallocarray and not any system-provided * reallocarray, we directly include code being tested, since it won't be |