Skip to content

Commit

Permalink
Merge pull request DescentDevelopers#70 from Lgt2x/linux-clang
Browse files Browse the repository at this point in the history
Fix Linux clang build
  • Loading branch information
JeodC authored Apr 18, 2024
2 parents 2760c3c + c68d641 commit 4f5bd86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ SET(CMAKE_POSITION_INDEPENDENT_CODE ON)

IF (UNIX)
SET (D3_GAMEDIR "~/Descent3/")
IF (APPLE)
SET(EXTRA_CXX_FLAGS "-Wno-address-of-temporary")
ELSE()
SET(EXTRA_CXX_FLAGS "-fpermissive")

IF (UNIX AND NOT APPLE)
SET(EXTRA_CXX_FLAGS "-fpermissive ")
ENDIF()

STRING(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar ${BITS} ${EXTRA_CXX_FLAGS}")
STRING(APPEND CMAKE_CXX_FLAGS " -Wno-write-strings -Wno-multichar -Wno-address-of-temporary ${BITS} ${EXTRA_CXX_FLAGS}")
STRING(APPEND CMAKE_C_FLAGS " ${BITS}")

FIND_PACKAGE(SDL REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion ui/UIEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ void UIEdit::SetText(char *text) {
void UIEdit::GetText(char *buffer, int len) {
// ASSERT(strlen(m_TextBuf) < (unsigned)len);
if (!m_TextBuf) {
buffer[0] = NULL;
buffer[0] = 0;
return;
}
strncpy(buffer, m_TextBuf, len - 1);
Expand Down

0 comments on commit 4f5bd86

Please sign in to comment.