From e22b008db494b1fa4b0450b31d1f711e1595186b Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Sat, 7 Feb 2015 13:48:51 -0800 Subject: [PATCH] va_copy exists on windows now as well as a define, so we can unify this code --- src/pal/src/misc/fmtmessage.cpp | 8 -------- src/pal/src/safecrt/input.inl | 16 ---------------- 2 files changed, 24 deletions(-) diff --git a/src/pal/src/misc/fmtmessage.cpp b/src/pal/src/misc/fmtmessage.cpp index ea7e98b792..c20cf97c22 100644 --- a/src/pal/src/misc/fmtmessage.cpp +++ b/src/pal/src/misc/fmtmessage.cpp @@ -695,11 +695,7 @@ FormatMessageW( { va_list TheArgs; -#ifdef __GNUC_VA_LIST va_copy(TheArgs, *Arguments); -#else // __GNUC_VA_LIST - TheArgs = *Arguments; -#endif // __GNUC_VA_LIST else UINT i = 0; for ( ; i < Index; i++ ) { @@ -778,11 +774,7 @@ FormatMessageW( else { va_list TheArgs; -#ifdef __GNUC_VA_LIST va_copy(TheArgs, *Arguments); -#else // __GNUC_VA_LIST - TheArgs = *Arguments; -#endif // __GNUC_VA_LIST else UINT i = 0; for ( ; i < Index; i++ ) { diff --git a/src/pal/src/safecrt/input.inl b/src/pal/src/safecrt/input.inl index e27d10220b..efb2e8f315 100644 --- a/src/pal/src/safecrt/input.inl +++ b/src/pal/src/safecrt/input.inl @@ -477,11 +477,7 @@ DEFAULT_LABEL: } if (!suppress) { -#ifdef __GNUC_VA_LIST va_copy(arglistsave, arglist); -#else - arglistsave = arglist; -#endif pointer = va_arg(arglist,void *); } else { pointer = NULL; // doesn't matter what value we use here - we're only using it as a flag @@ -526,20 +522,12 @@ DEFAULT_LABEL: #ifdef _SECURE_SCANF if(!suppress && (comchr == _T('c') || comchr == _T('s') || comchr == LEFT_BRACKET)) { -#ifdef __GNUC_VA_LIST va_copy(arglist, arglistsave); -#else - arglist = arglistsave; -#endif /* Reinitialize pointer to point to the array to which we write the input */ pointer = va_arg(arglist, void*); -#ifdef __GNUC_VA_LIST va_copy(arglistsave, arglist); -#else - arglistsave = arglist; -#endif /* Get the next argument - size of the array in characters */ #ifdef _WIN64 @@ -1217,11 +1205,7 @@ f_incwidth2: match--; /* % found, compensate for inc below */ if (!suppress) -#ifdef __GNUC_VA_LIST va_copy(arglist, arglistsave); -#else - arglist = arglistsave; -#endif } /* SWITCH */ -- 2.34.1