diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-18 23:00:13 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-12-18 23:00:13 +0100 |
commit | edee8a34465ba299fcfa29415586158de0513205 (patch) | |
tree | 2f16456549faaf134303eed7c940bc0ca5898c3d /src/pcm | |
parent | 5582367d68b4fbd53cb809b4018bc54d25c1cd6c (diff) |
Compiler.h: add gcc_returns_nonnull, gcc_returns_twice
Diffstat (limited to 'src/pcm')
-rw-r--r-- | src/pcm/PcmBuffer.hxx | 4 | ||||
-rw-r--r-- | src/pcm/SampleFormat.hxx | 2 |
2 files changed, 3 insertions, 3 deletions
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<typename T> - 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; |