Index: runtime/src/kmp_i18n.h =================================================================== --- runtime/src/kmp_i18n.h +++ runtime/src/kmp_i18n.h @@ -128,7 +128,7 @@ // Helper functions. Creates messages either from message catalog or from system. Note: these // functions allocate memory. You should pass created messages to __kmp_msg() function, it will // print messages and destroy them. -kmp_msg_t __kmp_msg_format( kmp_i18n_id_t id, ... ); +kmp_msg_t __kmp_msg_format( unsigned id_arg, ... ); kmp_msg_t __kmp_msg_error_code( int code ); kmp_msg_t __kmp_msg_error_mesg( char const * mesg ); Index: runtime/src/kmp_i18n.c =================================================================== --- runtime/src/kmp_i18n.c +++ runtime/src/kmp_i18n.c @@ -703,7 +703,7 @@ kmp_msg_t __kmp_msg_format( - kmp_i18n_id_t id, + unsigned id_arg, ... ) { @@ -712,7 +712,13 @@ kmp_str_buf_t buffer; __kmp_str_buf_init( & buffer ); - va_start( args, id ); + va_start( args, id_arg ); + + // We use unsigned for the ID argument and explicitly cast it here to the + // right enumerator because variadic functions are not compatible with + // default promotions. + kmp_i18n_id_t id = (kmp_i18n_id_t)id_arg; + #if KMP_OS_UNIX // On Linux* OS and OS X*, printf() family functions process parameter numbers, for example: // "%2$s %1$s". Index: runtime/src/thirdparty/ittnotify/ittnotify_static.c =================================================================== --- runtime/src/thirdparty/ittnotify/ittnotify_static.c +++ runtime/src/thirdparty/ittnotify/ittnotify_static.c @@ -285,10 +285,16 @@ #pragma warning(disable: 4055) /* warning C4055: 'type cast' : from data pointer 'void *' to function pointer 'XXX' */ #endif /* ITT_PLATFORM==ITT_PLATFORM_WIN */ -static void __itt_report_error(__itt_error_code code, ...) +static void __itt_report_error(unsigned code_arg, ...) { va_list args; - va_start(args, code); + va_start(args, code_arg); + + // We use unsigned for the code argument and explicitly cast it here to the + // right enumerator because variadic functions are not compatible with + // default promotions. + __itt_error_code code = (__itt_error_code)code_arg; + if (_N_(_ittapi_global).error_handler != NULL) { __itt_error_handler_t* handler = (__itt_error_handler_t*)(size_t)_N_(_ittapi_global).error_handler;