1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-08 14:02:17 +03:00

Fix C11 conformance

Ellipsis in variadic macro requires at least 1 argument
This commit is contained in:
Vladislav Vaintroub
2020-11-12 23:24:19 +00:00
parent 88e9d172b4
commit 777460c226

View File

@@ -63,12 +63,12 @@ static DWORD get_last_error()
return ERROR_INTERNAL_ERROR; return ERROR_INTERNAL_ERROR;
} }
#define FAIL(fmt,...) \ #define FAIL(...) \
{\ do{\
status = get_last_error();\ status = get_last_error();\
ma_format_win32_error(errmsg, errmsg_len, status, fmt, __VA_ARGS__);\ ma_format_win32_error(errmsg, errmsg_len, status, __VA_ARGS__);\
goto cleanup;\ goto cleanup;\
} } while (0)
/* /*
Load file into memory. Add null terminator at the end, so it will be a valid C string. Load file into memory. Add null terminator at the end, so it will be a valid C string.
@@ -654,7 +654,7 @@ static SECURITY_STATUS load_private_key(CERT_CONTEXT* cert, char* private_key_st
derbuf = LocalAlloc(0, derlen); derbuf = LocalAlloc(0, derlen);
if (!derbuf) if (!derbuf)
{ {
FAIL("LocalAlloc failed") FAIL("LocalAlloc failed");
} }
if (!CryptStringToBinaryA(private_key_str, (DWORD)len, CRYPT_STRING_BASE64HEADER, derbuf, &derlen, NULL, NULL)) if (!CryptStringToBinaryA(private_key_str, (DWORD)len, CRYPT_STRING_BASE64HEADER, derbuf, &derlen, NULL, NULL))