Skip to content

Commit

Permalink
CMake: Add -Werror=incompatible-pointer-types
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed May 29, 2023
1 parent 4b7223c commit b80797a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if(NOT MSVC)
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-format")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} -Werror=implicit-function-declaration -Werror=implicit-int -fwrapv")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -fwrapv")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267 /Zc:preprocessor-")
Expand Down
2 changes: 1 addition & 1 deletion src/feature/updater-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ int main(int argc, char* argv[]) {
const char* argv[] = { qbin, NULL };
_execv(bin, argv);
#elif defined(_POSIX_C_SOURCE) || defined(__APPLE__)
const char* argv[] = { bin, NULL };
char* const argv[] = { bin, NULL };
execv(bin, argv);
#endif
}
Expand Down

0 comments on commit b80797a

Please sign in to comment.