1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +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

@ -146,17 +146,19 @@ void setupSignalHandlers()
#endif
}
void setupCwd(Config* cf)
int8_t setupCwd(Config* cf)
{
string workdir = startup::StartUp::tmpDir();
if (workdir.length() == 0)
workdir = ".";
(void)chdir(workdir.c_str());
int8_t rc = chdir(workdir.c_str());
if (access(".", W_OK) != 0)
(void)chdir("/tmp");
if (rc < 0 || access(".", W_OK) != 0)
rc = chdir("/tmp");
return rc;
}
int setupResources()
@ -342,11 +344,11 @@ int main(int argc, char* argv[])
setupSignalHandlers();
setupCwd(cf);
int err = 0;
err = setupCwd(cf);
mlp = new primitiveprocessor::Logger();
int err = 0;
if (!gDebug)
err = setupResources();
string errMsg;
@ -366,6 +368,10 @@ int main(int argc, char* argv[])
errMsg = "Could not install file limits to required value, please see non-root install documentation";
break;
case -5:
errMsg = "Could not change into working directory";
break;
default:
break;
}