Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 34d96ae

Browse files
committed
fix warning on --disable-float
1 parent df45c6b commit 34d96ae

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/str/vsnprintf_s.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,9 @@ int safec_vsnprintf_s(out_fct_type out, const char *funcname, char *buffer,
857857
size_t idx = 0U;
858858
unsigned int flags, width, precision, n;
859859
int rc = 0;
860+
#ifdef PRINTF_SUPPORT_FLOAT
860861
const char *startformat = NULL;
862+
#endif
861863

862864
while (*format) {
863865
if ((long)idx < 0)
@@ -871,7 +873,9 @@ int safec_vsnprintf_s(out_fct_type out, const char *funcname, char *buffer,
871873
format++;
872874
continue;
873875
} else {
876+
#ifdef PRINTF_SUPPORT_FLOAT
874877
startformat = (char *)format;
878+
#endif
875879
// yes, evaluate it
876880
format++;
877881
}

0 commit comments

Comments
 (0)