1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-537 There are no CS-specific warnings building with gcc 8.2.

This commit is contained in:
Roman Nozdrin
2019-04-29 12:26:12 +03:00
parent 9dc33c4e82
commit 7e2cb05624
23 changed files with 94 additions and 334 deletions

View File

@ -51,12 +51,14 @@ using namespace idbdatafile;
namespace
{
#ifdef USE_VERY_COMPLEX_DROP_CACHES
void timespec_sub(const struct timespec& tv1,
const struct timespec& tv2,
double& tm)
{
tm = (double)(tv2.tv_sec - tv1.tv_sec) + 1.e-9 * (tv2.tv_nsec - tv1.tv_nsec);
}
#endif
}
namespace BRM
@ -2176,8 +2178,12 @@ void SlaveComm::do_flushInodeCache()
if ((fd = open("/proc/sys/vm/drop_caches", O_WRONLY)) >= 0)
{
write(fd, "3\n", 2);
close(fd);
ssize_t written = write(fd, "3\n", 2);
int rc = close(fd);
if ( !written || rc )
{
std::cerr << "Could not write into or close /proc/sys/vm/drop_caches" << std::endl;
}
}
#endif