Skip to content

Commit 6bd64c6

Browse files
author
Vitaly Baranov
authored
Fix clang warning -Wused-but-marked-unused. (simdjson#1042)
* Fix clang warning -Wused-but-marked-unused. * Fix build.
1 parent ba58d86 commit 6bd64c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

include/simdjson/common_defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ constexpr size_t DEFAULT_MAX_DEPTH = 1024;
9898

9999
#else // SIMDJSON_REGULAR_VISUAL_STUDIO
100100

101-
#define really_inline inline __attribute__((always_inline, unused))
102-
#define never_inline inline __attribute__((noinline, unused))
101+
#define really_inline inline __attribute__((always_inline))
102+
#define never_inline inline __attribute__((noinline))
103103

104104
#define UNUSED __attribute__((unused))
105105
#define WARN_UNUSED __attribute__((warn_unused_result))

src/generic/stage1/find_next_document_index.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* complete document, therefore the last json buffer location is the end of the
2424
* batch.
2525
*/
26-
really_inline static uint32_t find_next_document_index(dom_parser_implementation &parser) {
26+
really_inline uint32_t find_next_document_index(dom_parser_implementation &parser) {
2727
// TODO don't count separately, just figure out depth
2828
auto arr_cnt = 0;
2929
auto obj_cnt = 0;
@@ -65,7 +65,7 @@ really_inline static uint32_t find_next_document_index(dom_parser_implementation
6565
}
6666

6767
// Skip the last character if it is partial
68-
really_inline static size_t trim_partial_utf8(const uint8_t *buf, size_t len) {
68+
really_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) {
6969
if (unlikely(len < 3)) {
7070
switch (len) {
7171
case 2:

0 commit comments

Comments
 (0)