summaryrefslogtreecommitdiffstats
path: root/doc/overview_code.c
diff options
context:
space:
mode:
Diffstat (limited to 'doc/overview_code.c')
-rw-r--r--doc/overview_code.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/doc/overview_code.c b/doc/overview_code.c
index 6835d9a..063f829 100644
--- a/doc/overview_code.c
+++ b/doc/overview_code.c
@@ -1,4 +1,4 @@
-// Copyright 2021-2023 David Robillard <d@drobilla.net>
+// Copyright 2021-2024 David Robillard <d@drobilla.net>
// SPDX-License-Identifier: ISC
/*
@@ -11,11 +11,6 @@
#include <zix/attributes.h>
#include <zix/string_view.h>
-#if defined(__GNUC__)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wunused-variable"
-#endif
-
static void
string_views(void)
{
@@ -24,6 +19,7 @@ string_views(void)
// begin make-empty-string
ZixStringView empty = zix_empty_string();
// end make-empty-string
+ (void)empty;
// begin make-static-string
static const ZixStringView hello = ZIX_STATIC_STRING("hello");
@@ -33,10 +29,12 @@ string_views(void)
// begin measure-string
ZixStringView view = zix_string(string_pointer);
// end measure-string
+ (void)view;
// begin make-string-view
ZixStringView slice = zix_substring(string_pointer, 4);
// end make-string-view
+ (void)slice;
}
ZIX_CONST_FUNC int
@@ -45,7 +43,3 @@ main(void)
string_views();
return 0;
}
-
-#if defined(__GNUC__)
-# pragma GCC diagnostic pop
-#endif