From 6bd64c6873ed75069fc066e2bf712ee53fb42def Mon Sep 17 00:00:00 2001 From: Vitaly Baranov Date: Wed, 15 Jul 2020 20:28:51 +0300 Subject: [PATCH] Fix clang warning -Wused-but-marked-unused. (#1042) * Fix clang warning -Wused-but-marked-unused. * Fix build. --- include/simdjson/common_defs.h | 4 ++-- src/generic/stage1/find_next_document_index.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/simdjson/common_defs.h b/include/simdjson/common_defs.h index 9f0cf3dcb..737fd516c 100644 --- a/include/simdjson/common_defs.h +++ b/include/simdjson/common_defs.h @@ -98,8 +98,8 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024; #else // SIMDJSON_REGULAR_VISUAL_STUDIO - #define really_inline inline __attribute__((always_inline, unused)) - #define never_inline inline __attribute__((noinline, unused)) + #define really_inline inline __attribute__((always_inline)) + #define never_inline inline __attribute__((noinline)) #define UNUSED __attribute__((unused)) #define WARN_UNUSED __attribute__((warn_unused_result)) diff --git a/src/generic/stage1/find_next_document_index.h b/src/generic/stage1/find_next_document_index.h index 302af1751..41d6bdb14 100644 --- a/src/generic/stage1/find_next_document_index.h +++ b/src/generic/stage1/find_next_document_index.h @@ -23,7 +23,7 @@ * complete document, therefore the last json buffer location is the end of the * batch. */ -really_inline static uint32_t find_next_document_index(dom_parser_implementation &parser) { +really_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { // TODO don't count separately, just figure out depth auto arr_cnt = 0; auto obj_cnt = 0; @@ -65,7 +65,7 @@ really_inline static uint32_t find_next_document_index(dom_parser_implementation } // Skip the last character if it is partial -really_inline static size_t trim_partial_utf8(const uint8_t *buf, size_t len) { +really_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { if (unlikely(len < 3)) { switch (len) { case 2: