Fix use of bool in va_start causing undefined behavior
The version of clang included in Apple LLVM 9.1.0 complains about passing the bool parameter `is_error` to va_start, which causes make to fail: fdbrpc/TLSConnection.actor.cpp:370:16: error: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Werror,-Wvarargs] va_start( ap, is_error ); ^ This just switches is_error back to the type it gets promoted to (int).
This commit is contained in:
parent
8472f10469
commit
7c35ea6ba1
|
@ -131,7 +131,7 @@ struct ITLSPolicy {
|
|||
// remaining arguments must be pairs of (const char*); the first of
|
||||
// each pair must be a valid XML attribute name, and the second a
|
||||
// valid XML attribute value. The final parameter must be NULL.
|
||||
typedef void(*ITLSLogFunc)(const char* event, void* uid, bool is_error, ...);
|
||||
typedef void(*ITLSLogFunc)(const char* event, void* uid, int is_error, ...);
|
||||
|
||||
struct ITLSPlugin {
|
||||
virtual void addref() = 0;
|
||||
|
|
|
@ -347,7 +347,7 @@ Reference<ITLSPolicy> TLSOptions::get_policy(PolicyType type) {
|
|||
return policy;
|
||||
}
|
||||
|
||||
static void TLSConnectionLogFunc( const char* event, void* uid_ptr, bool is_error, ... ) {
|
||||
static void TLSConnectionLogFunc( const char* event, void* uid_ptr, int is_error, ... ) {
|
||||
UID uid;
|
||||
|
||||
if ( uid_ptr )
|
||||
|
|
Loading…
Reference in New Issue