From 8874670463276073fe6cdb0bccd0d9a9a982b4c5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Dec 2024 10:06:03 -0500 Subject: Fix clang and clang-tidy warnings on Windows --- doc/overview_code.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'doc') 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 +// Copyright 2021-2024 David Robillard // SPDX-License-Identifier: ISC /* @@ -11,11 +11,6 @@ #include #include -#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 -- cgit v1.2.1