summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2023-11-10 10:53:47 +0100
committerMoonchild <moonchild@palemoon.org>2023-11-10 10:53:47 +0100
commite869b44d0fa41f5b7062d169f4d374966f5c2edc (patch)
tree3e6df0350b935b2d937c070ee317cd88c65146b4
parent3dfad036497d3de429adfb7b72fc1a6fe5ec0ac6 (diff)
downloaduxp-e869b44d0fa41f5b7062d169f4d374966f5c2edc.tar.gz
Issue #2342 - Don't use [[nodiscard]] in C mode in mozalloc.
Since both gcc and clang support the internal __attribute__ form, and this is guarded by HAVE_POSIX_MEMALIGN which is not a Windows thing, it's safe to just use that attribute style unconditionally.
-rw-r--r--memory/mozalloc/mozalloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h
index 5448e5a1ee..fca8c35413 100644
--- a/memory/mozalloc/mozalloc.h
+++ b/memory/mozalloc/mozalloc.h
@@ -87,10 +87,10 @@ MFBT_API char* moz_xstrndup(const char* str, size_t strsize)
#if defined(HAVE_POSIX_MEMALIGN)
-MFBT_API [[nodiscard]]
+MFBT_API __attribute__ ((warn_unused_result))
int moz_xposix_memalign(void **ptr, size_t alignment, size_t size);
-MFBT_API [[nodiscard]]
+MFBT_API __attribute__ ((warn_unused_result))
int moz_posix_memalign(void **ptr, size_t alignment, size_t size);
#endif /* if defined(HAVE_POSIX_MEMALIGN) */