diff options
author | Jack Lloyd <[email protected]> | 2016-11-09 14:16:48 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-09 14:16:48 -0500 |
commit | 719a5e3f319e423467a614ce1625a5ec43a82383 (patch) | |
tree | ff4a581c6f81f82ec558fbc96991f31aec041b9c /src/lib/utils | |
parent | 35f3a9a210673a226be5cdab67e771b7a87b7c68 (diff) |
Add BOTAN_WARN_UNUSED_RESULT macro
Only works for GCC and Clang
Diffstat (limited to 'src/lib/utils')
-rw-r--r-- | src/lib/utils/data_src.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/utils/data_src.h b/src/lib/utils/data_src.h index b24fd75a4..299a42ab5 100644 --- a/src/lib/utils/data_src.h +++ b/src/lib/utils/data_src.h @@ -30,7 +30,7 @@ class BOTAN_DLL DataSource * @return length in bytes that was actually read and put * into out */ - virtual size_t read(byte out[], size_t length) = 0; + virtual size_t read(byte out[], size_t length) BOTAN_WARN_UNUSED_RESULT = 0; virtual bool check_available(size_t n) = 0; @@ -45,8 +45,7 @@ class BOTAN_DLL DataSource * @return length in bytes that was actually read and put * into out */ - virtual size_t peek(byte out[], size_t length, - size_t peek_offset) const = 0; + virtual size_t peek(byte out[], size_t length, size_t peek_offset) const BOTAN_WARN_UNUSED_RESULT = 0; /** * Test whether the source still has data that can be read. |