diff options
author | David Robillard <d@drobilla.net> | 2024-12-11 10:06:03 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-12-11 10:06:33 -0500 |
commit | 8874670463276073fe6cdb0bccd0d9a9a982b4c5 (patch) | |
tree | 3a95fee69e627c0bac27206b2db7de1fcf17abc0 /doc | |
parent | 52048ee6db71982693cdeb603e725a867afd99e5 (diff) | |
download | zix-8874670463276073fe6cdb0bccd0d9a9a982b4c5.tar.gz zix-8874670463276073fe6cdb0bccd0d9a9a982b4c5.tar.bz2 zix-8874670463276073fe6cdb0bccd0d9a9a982b4c5.zip |
Fix clang and clang-tidy warnings on Windows
Diffstat (limited to 'doc')
-rw-r--r-- | doc/overview_code.c | 14 |
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 |