Skip to content

Commit 302ce63

Browse files
committed
stubs: silence unused function warning
When building on Linux, the definition of `swift_snprintf_l` would cause an unused function warning. Expand the scope of the preprocessor guard to encompass the function for the single use. This avoids the unused function warning.
1 parent a34ac08 commit 302ce63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/stubs/Stubs.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@ static locale_t getCLocale() {
171171
}
172172
#endif
173173

174+
#if !SWIFT_DTOA_FLOAT80_SUPPORT
174175
#if defined(__APPLE__)
175176
#define swift_snprintf_l snprintf_l
176177
#elif defined(__CYGWIN__) || defined(_WIN32) || defined(__HAIKU__)
177-
// In Cygwin, swift_snprintf_l() is not used.
178+
// swift_snprintf_l() is not used.
178179
#else
179180
static int swift_snprintf_l(char *Str, size_t StrSize, locale_t Locale,
180181
const char *Format, ...) {
@@ -194,7 +195,6 @@ static int swift_snprintf_l(char *Str, size_t StrSize, locale_t Locale,
194195
}
195196
#endif
196197

197-
#if !SWIFT_DTOA_FLOAT80_SUPPORT
198198
template <typename T>
199199
static uint64_t swift_floatingPointToString(char *Buffer, size_t BufferLength,
200200
T Value, const char *Format,

0 commit comments

Comments
 (0)