diff options
author | Daiki Ueno <ueno@gnu.org> | 2021-03-10 16:12:23 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2021-04-04 10:20:59 +0200 |
commit | dc07b8228b4bab83af5bcf7a2efd9d2a0f10f628 (patch) | |
tree | 5ec3806a5a9cb2213d6340f31962539eaa6fc60a | |
parent | 8de3bd90e1d958147331882a51263216b5ea96d2 (diff) | |
download | gnutls-dc07b8228b4bab83af5bcf7a2efd9d2a0f10f628.tar.gz |
str: suppress -Wunused-function if AGGRESSIVE_REALLOC is defined
Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r-- | lib/str.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -87,15 +87,6 @@ void _gnutls_buffer_clear(gnutls_buffer_st * str) #define MIN_CHUNK 1024 -static void align_allocd_with_data(gnutls_buffer_st * dest) -{ - assert(dest->allocd != NULL); - assert(dest->data != NULL); - if (dest->length) - memmove(dest->allocd, dest->data, dest->length); - dest->data = dest->allocd; -} - /** * gnutls_buffer_append_data: * @dest: the buffer to append to @@ -168,6 +159,15 @@ int _gnutls_buffer_resize(gnutls_buffer_st * dest, size_t new_size) #else +static void align_allocd_with_data(gnutls_buffer_st * dest) +{ + assert(dest->allocd != NULL); + assert(dest->data != NULL); + if (dest->length) + memmove(dest->allocd, dest->data, dest->length); + dest->data = dest->allocd; +} + int _gnutls_buffer_resize(gnutls_buffer_st * dest, size_t new_size) { if (unlikely(dest->data != NULL && dest->allocd == NULL)) |