diff options
| author | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:33:59 +0300 |
|---|---|---|
| committer | Kirill A. Shutemov <kirill@shutemov.name> | 2011-08-30 23:33:59 +0300 |
| commit | 51d0044629d0ac3e0f419910996c972b547f1156 (patch) | |
| tree | b9c83758cc221f297725bb64e4a77f58cf583de6 | |
| parent | 0b2c4061878bc5b437b1a9e9b5f43c357283980e (diff) | |
| download | libgit2-51d0044629d0ac3e0f419910996c972b547f1156.tar.gz | |
CMakefile: add -Wstrict-prototypes and fix warnings
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | src/repository.c | 2 | ||||
| -rw-r--r-- | tests/t00-core.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e73f98256..f0ac57ac1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ IF (MSVC) SET(CMAKE_C_FLAGS_DEBUG "/Od /DEBUG /MTd") SET(CMAKE_C_FLAGS_RELEASE "/MT /O2") 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 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC") ENDIF () diff --git a/src/repository.c b/src/repository.c index 1b06c4f03..7d243398b 100644 --- a/src/repository.c +++ b/src/repository.c @@ -174,7 +174,7 @@ static int quickcheck_repository_dir(const char *repository_path) return GIT_SUCCESS; } -static git_repository *repository_alloc() +static git_repository *repository_alloc(void) { int error; diff --git a/tests/t00-core.c b/tests/t00-core.c index 6d63d1ce1..5d1a7ac7c 100644 --- a/tests/t00-core.c +++ b/tests/t00-core.c @@ -506,7 +506,7 @@ END_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]; |
