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

MCOL-537 Enabled -Wno-unused-result for OAM code.

Fixed pragmas that disables compilation checks.

    DDLProc now returns an error if it couldn't cwd.

    Use either auto_ptr or unique_ptr depending on GCC version.
This commit is contained in:
Roman Nozdrin
2019-05-08 11:41:26 +03:00
parent 7e2cb05624
commit b2436502cb
18 changed files with 85 additions and 39 deletions

View File

@ -1,4 +1,5 @@
/* Copyright (C) 2014 InfiniDB, Inc.
Copyright (C) 2019 MariaDB Corporation.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@ -1925,12 +1926,15 @@ int ChunkManager::reallocateChunks(CompFileData* fileData)
char tmText[24];
// this snprintf call causes a compiler warning b/c buffer size is less
// then maximum string size.
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation="
snprintf(tmText, sizeof(tmText), ".%04d%02d%02d%02d%02d%02d%06ld",
ltm.tm_year + 1900, ltm.tm_mon + 1,
ltm.tm_mday, ltm.tm_hour, ltm.tm_min,
ltm.tm_sec, tv.tv_usec);
#pragma GCC diagnostic pop
#endif
string dbgFileName(rlcFileName + tmText);
ostringstream oss;
@ -2112,12 +2116,15 @@ int ChunkManager::reallocateChunks(CompFileData* fileData)
char tmText[24];
// this snprintf call causes a compiler warning b/c buffer size is less
// then maximum string size.
#if defined(__GNUC__) && __GNUC__ >= 5
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat-truncation="
snprintf(tmText, sizeof(tmText), ".%04d%02d%02d%02d%02d%02d%06ld",
ltm.tm_year + 1900, ltm.tm_mon + 1,
ltm.tm_mday, ltm.tm_hour, ltm.tm_min,
ltm.tm_sec, tv.tv_usec);
#pragma GCC diagnostic pop
#endif
string dbgFileName(rlcFileName + tmText);
ostringstream oss;