From edee8a34465ba299fcfa29415586158de0513205 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 18 Dec 2017 23:00:13 +0100 Subject: Compiler.h: add gcc_returns_nonnull, gcc_returns_twice --- src/pcm/PcmBuffer.hxx | 4 ++-- src/pcm/SampleFormat.hxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pcm') diff --git a/src/pcm/PcmBuffer.hxx b/src/pcm/PcmBuffer.hxx index 0c4b62431..68b169eb3 100644 --- a/src/pcm/PcmBuffer.hxx +++ b/src/pcm/PcmBuffer.hxx @@ -47,11 +47,11 @@ public: * to signal "error". An empty destination buffer is not * always an error. */ - gcc_malloc + gcc_malloc gcc_returns_nonnull void *Get(size_t size); template - gcc_malloc + gcc_malloc gcc_returns_nonnull T *GetT(size_t n) { return (T *)Get(n * sizeof(T)); } diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx index 9d956b7f9..badfe1781 100644 --- a/src/pcm/SampleFormat.hxx +++ b/src/pcm/SampleFormat.hxx @@ -122,7 +122,7 @@ sample_format_size(SampleFormat format) * @param format a #SampleFormat enum value * @return the string */ -gcc_pure gcc_malloc +gcc_pure gcc_malloc gcc_returns_nonnull const char * sample_format_to_string(SampleFormat format) noexcept; -- cgit v1.2.3