Skip to content

Commit 71661e4

Browse files
committed
Added more attribute unused to appease clang
1 parent ddbddab commit 71661e4

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

Release/src/json/json_parsing.cpp

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,15 @@ namespace
393393
{
394394
return _snwprintf_s_l(ptr, n, _TRUNCATE, L"%I64u", utility::details::scoped_c_thread_locale::c_locale(), val64);
395395
}
396+
static double anystod(const char* str)
397+
{
398+
return _strtod_l(str, nullptr, utility::details::scoped_c_thread_locale::c_locale());
399+
}
400+
static double anystod(const wchar_t* str)
401+
{
402+
return _wcstod_l(str, nullptr, utility::details::scoped_c_thread_locale::c_locale());
403+
}
396404
#else
397-
398405
static int __attribute__((__unused__)) print_llu(char* ptr, size_t n, unsigned long long val64)
399406
{
400407
return snprintf(ptr, n, "%llu", val64);
@@ -403,24 +410,15 @@ namespace
403410
{
404411
return snprintf(ptr, n, "%lu", val64);
405412
}
406-
#endif
407-
408-
static double anystod(const char* str)
413+
static double __attribute__((__unused__)) anystod(const char* str)
409414
{
410-
#ifdef _MS_WINDOWS
411-
return _strtod_l(str, nullptr, utility::details::scoped_c_thread_locale::c_locale());
412-
#else
413415
return strtod(str, nullptr);
414-
#endif
415416
}
416-
static double anystod(const wchar_t* str)
417+
static double __attribute__((__unused__)) anystod(const wchar_t* str)
417418
{
418-
#ifdef _MS_WINDOWS
419-
return _wcstod_l(str, nullptr, utility::details::scoped_c_thread_locale::c_locale());
420-
#else
421419
return wcstod(str, nullptr);
422-
#endif
423420
}
421+
#endif
424422
}
425423

426424
template <typename CharType>

0 commit comments

Comments
 (0)