1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

MCOL-537 Preprocessor if blocks with pragmas now have else branch.

DMLProc exits on setupCwd failure.
This commit is contained in:
Roman Nozdrin
2019-05-09 20:25:21 +03:00
parent b2436502cb
commit 3c89a4bba4
9 changed files with 75 additions and 24 deletions

View File

@ -2429,11 +2429,13 @@ int64_t DataConvert::intToDate(int64_t data)
// this snprintf call causes a compiler warning b/c we're potentially copying a 20-digit #
// into 15 bytes, however, that appears to be intentional.
#if defined(__GNUC__) && __GNUC__ >= 5
#if defined(__GNUC__) && __GNUC__ >= 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation="
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#pragma GCC diagnostic pop
#else
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#endif
string year, month, day, hour, min, sec, msec;
@ -2563,11 +2565,13 @@ int64_t DataConvert::intToDatetime(int64_t data, bool* date)
// this snprintf call causes a compiler warning b/c we're potentially copying a 20-digit #
// into 15 bytes, however, that appears to be intentional.
#if defined(__GNUC__) && __GNUC__ >= 5
#if defined(__GNUC__) && __GNUC__ >= 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation="
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#pragma GCC diagnostic pop
#else
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#endif
//string date = buf;
@ -2699,11 +2703,13 @@ int64_t DataConvert::intToTime(int64_t data, bool fromString)
// this snprintf call causes a compiler warning b/c we're potentially copying a 20-digit #
// into 15 bytes, however, that appears to be intentional.
#if defined(__GNUC__) && __GNUC__ >= 5
#if defined(__GNUC__) && __GNUC__ >= 6
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation="
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#pragma GCC diagnostic pop
#else
snprintf( buf, 15, "%llu", (long long unsigned int)data);
#endif
//string date = buf;