Skip to content

Commit

Permalink
Enable -Werror=writable-strings and fix one such error
Browse files Browse the repository at this point in the history
(cherry picked from commit a766d14)
  • Loading branch information
qris committed Dec 8, 2017
1 parent 95e6963 commit 493081a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions infrastructure/m4/boxbackup_tests.m4
Expand Up @@ -42,6 +42,7 @@ BOX_CHECK_CXX_FLAG(-Werror=unused-private-field)
dnl AX_CHECK_COMPILE_FLAG(-Werror=sometimes-uninitialized,
dnl [cxxflags_strict="$cxxflags_strict -Werror=sometimes-uninitialized"])
BOX_CHECK_CXX_FLAG(-Werror=overloaded-virtual)
BOX_CHECK_CXX_FLAG(-Werror=writable-strings)
# This error is detected by MSVC, but not usually by GCC/Clang:
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58114
BOX_CHECK_CXX_FLAG(-Werror=delete-incomplete)
Expand Down
2 changes: 1 addition & 1 deletion lib/common/Utils.cpp
Expand Up @@ -378,7 +378,7 @@ std::string GetTempDirPath()
}
return std::string(buffer);
#else
char* result = getenv("TMPDIR");
const char* result = getenv("TMPDIR");
if(result == NULL)
{
result = getenv("TEMP");
Expand Down

0 comments on commit 493081a

Please sign in to comment.