From: Steven R. Loomis Date: Wed, 24 May 2017 23:25:33 +0000 (+0000) Subject: ICU-13030 cleanup U_CALLCONV on windows. Also, initialize an uninitialized var X-Git-Tag: release-60-rc~146^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1da2f1d9f6fecd8289651d2f4cc4723ac28610e;p=icu ICU-13030 cleanup U_CALLCONV on windows. Also, initialize an uninitialized var X-SVN-Rev: 40137 --- diff --git a/icu4c/source/common/ucurr.cpp b/icu4c/source/common/ucurr.cpp index f2cae13ce33..e2ccf50841a 100644 --- a/icu4c/source/common/ucurr.cpp +++ b/icu4c/source/common/ucurr.cpp @@ -588,7 +588,7 @@ ucurr_forLocale(const char* locale, idDelim[0] = 0; } - const UChar* s; // Currency code from data file. + const UChar* s = NULL; // Currency code from data file. if (id[0] == 0) { // No point looking in the data for an empty string. // This is what we would get. diff --git a/icu4c/source/common/unicode/platform.h b/icu4c/source/common/unicode/platform.h index 4bb4ecb4122..d4f9a746221 100644 --- a/icu4c/source/common/unicode/platform.h +++ b/icu4c/source/common/unicode/platform.h @@ -830,6 +830,16 @@ namespace std { # define U_CALLCONV U_EXPORT2 #endif + /** + * \def U_CALLCONV_FPTR + * Similar to U_CALLCONV, but only used on function pointers. + * @internal + */ +#if U_PLATFORM == U_PF_OS390 && defined(__cplusplus) +# define U_CALLCONV_FPTR U_CALLCONV +#else +# define U_CALLCONV_FPTR +#endif /* @} */ #endif diff --git a/icu4c/source/common/unicode/uclean.h b/icu4c/source/common/unicode/uclean.h index 5beb1f7c37a..5b0486d3950 100644 --- a/icu4c/source/common/unicode/uclean.h +++ b/icu4c/source/common/unicode/uclean.h @@ -149,7 +149,7 @@ typedef void U_CALLCONV UMemFreeFn (const void *context, void *mem); * @system */ U_STABLE void U_EXPORT2 -u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV a, UMemReallocFn * U_CALLCONV r, UMemFreeFn * U_CALLCONV f, +u_setMemoryFunctions(const void *context, UMemAllocFn * U_CALLCONV_FPTR a, UMemReallocFn * U_CALLCONV_FPTR r, UMemFreeFn * U_CALLCONV_FPTR f, UErrorCode *status); U_CDECL_END