diff --git a/src/Table.cpp b/src/Table.cpp index 6398e0065..1d78dfde1 100644 --- a/src/Table.cpp +++ b/src/Table.cpp @@ -803,7 +803,7 @@ void Table::optimize (std::string& output) const Much better. */ - char* patterns[] = + char patterns[5][16] = { " \n", " \n", diff --git a/src/edit.cpp b/src/edit.cpp index 7944993bf..445e8a1c6 100644 --- a/src/edit.cpp +++ b/src/edit.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include "task.h" @@ -510,7 +510,8 @@ std::string handleEdit (TDB& tdb, T& task, Config& conf) pattern << dataLocation << "/task." << seq->getId () << ".XXXXXX"; char cpattern [PATH_MAX]; strcpy (cpattern, pattern.str ().c_str ()); - char* file = mktemp (cpattern); + mkstemp (cpattern); + char* file = cpattern; // Format the contents, T -> text, write to a file. std::string before = formatTask (conf, *seq);