From: Michael Jeanson Date: Tue, 7 Mar 2023 19:10:00 +0000 (-0500) Subject: port: add missing attributes in getrandom_nonblock() on macOS X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=45cc2527c1b679884570130eca8f285b2a9a8406;p=lttng-tools.git port: add missing attributes in getrandom_nonblock() on macOS Change-Id: I2e4944cf17ba72c75b8c5cfd5ce0d7b806d14b67 Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/random.cpp b/src/common/random.cpp index 8d9bcfd41..b282d67d0 100644 --- a/src/common/random.cpp +++ b/src/common/random.cpp @@ -72,7 +72,9 @@ void getrandom_nonblock(char *out_data, std::size_t size) } } #else /* defined(__linux__) && defined(SYS_getrandom) && defined(HAVE_SYS_RANDOM_H) */ -void getrandom_nonblock(char *out_data, std::size_t size) +__attribute__((noreturn)) +void getrandom_nonblock(char *out_data __attribute__((unused)), + std::size_t size __attribute__((unused))) { LTTNG_THROW_RANDOM_PRODUCTION_ERROR("getrandom() is not supported by this platform"); }