Skip to content

Commit

Permalink
Make CFLAGS stricter for gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
JayFoxRox committed May 19, 2018
1 parent 9732874 commit 92c9205
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ project(swe1r-tools)

set(CMAKE_C_STANDARD 11)

if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pedantic -Wextra -Wno-unused-parameter -Werror")
endif()

add_definitions(-D__cdecl=)

add_executable(decompress decompress.c)
Expand Down
2 changes: 1 addition & 1 deletion decompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define MAGIC(a1, a2, a3, a4) (((a1) << 24) | ((a2) << 16) | ((a3) << 8) | (a4))

static inline uint32_t swap32(uint32_t v) {
return ((v & 0xFF0000 | (v >> 16)) >> 8) | (((v << 16) | v & 0xFF00) << 8);
return (((v & 0xFF0000) | (v >> 16)) >> 8) | (((v << 16) | (v & 0xFF00)) << 8);
}

//----- (0042D520) --------------------------------------------------------
Expand Down

0 comments on commit 92c9205

Please sign in to comment.