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

MCOL-4010 - fixes compilation errors on x64 w/-Werror

Merged in Sergei's patch.
This commit is contained in:
Patrick LeBlanc
2020-06-01 12:52:43 -04:00
parent a8f5d353bd
commit 4bddc92092
9 changed files with 16 additions and 33 deletions

View File

@ -132,35 +132,18 @@ namespace helpers
const char* convNumToStr(int64_t val, char* dst, int radix)
{
if (radix == 16 || radix == -16)
#ifdef _MSC_VER
sprintf(dst, "%llX", val);
sprintf(dst, "%llX", (long long)val);
#else
sprintf(dst, "%lX", val);
#endif
else if (radix == 8 || radix == -8)
#ifdef _MSC_VER
sprintf(dst, "%llo", val);
sprintf(dst, "%llo", (long long)val);
#else
sprintf(dst, "%lo", val);
#endif
else if (radix == 10)
{
uint64_t uval = static_cast<uint64_t>(val);
#ifdef _MSC_VER
sprintf(dst, "%llu", uval);
#else
sprintf(dst, "%lu", uval);
#endif
sprintf(dst, "%llu", (unsigned long long)val);
}
else if (radix == -10)
#ifdef _MSC_VER
sprintf(dst, "%lld", val);
sprintf(dst, "%lld", (long long)val);
#else
sprintf(dst, "%ld", val);
#endif
else if (radix == 2 || radix == -2)
{
char tmp[65];

View File

@ -122,7 +122,7 @@ protected:
// [ the default format in treenode.h is fixed-point notation ]
char buf[20];
long double floatVal;
int64_t exponent;
int exponent;
long double base;
switch (fp->data()->resultType().colDataType)
@ -157,7 +157,7 @@ protected:
{
snprintf(buf, 20, "%.5Lf", base);
fFloatStr = execplan::removeTrailing0(buf, 20);
snprintf(buf, 20, "e%02ld", exponent);
snprintf(buf, 20, "e%02d", exponent);
fFloatStr += buf;
}