summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2021-03-10 16:12:23 +0100
committerDaiki Ueno <ueno@gnu.org>2021-04-04 10:20:59 +0200
commitdc07b8228b4bab83af5bcf7a2efd9d2a0f10f628 (patch)
tree5ec3806a5a9cb2213d6340f31962539eaa6fc60a
parent8de3bd90e1d958147331882a51263216b5ea96d2 (diff)
downloadgnutls-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.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/str.c b/lib/str.c
index bc20ebb04f..8007340f1e 100644
--- a/lib/str.c
+++ b/lib/str.c
@@ -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))