mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-13 21:26:20 +00:00
CMakefile: add -Wstrict-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
This commit is contained in:
parent
0b2c406187
commit
51d0044629
@ -57,7 +57,7 @@ IF (MSVC)
|
|||||||
SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd")
|
SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd")
|
||||||
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
|
SET(CMAKE_C_FLAGS_RELEASE "/MT /O2")
|
||||||
ELSE ()
|
ELSE ()
|
||||||
SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wstrict-aliasing=2")
|
SET(CMAKE_C_FLAGS "-O2 -g -Wall -Wextra -Wstrict-aliasing=2 -Wstrict-prototypes")
|
||||||
IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
|
IF (NOT MINGW) # MinGW always does PIC and complains if we tell it to
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||||
ENDIF ()
|
ENDIF ()
|
||||||
|
@ -174,7 +174,7 @@ static int quickcheck_repository_dir(const char *repository_path)
|
|||||||
return GIT_SUCCESS;
|
return GIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static git_repository *repository_alloc()
|
static git_repository *repository_alloc(void)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ END_TEST
|
|||||||
|
|
||||||
static char *empty_tmp_dir = "test_gitfo_rmdir_recurs_test";
|
static char *empty_tmp_dir = "test_gitfo_rmdir_recurs_test";
|
||||||
|
|
||||||
static int setup_empty_tmp_dir()
|
static int setup_empty_tmp_dir(void)
|
||||||
{
|
{
|
||||||
char path[GIT_PATH_MAX];
|
char path[GIT_PATH_MAX];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user