Conforming to libgit2 coding style.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
diff --git a/.gitignore b/.gitignore
index d4e0454..a28d738 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
.lock-wafbuild
.waf*
build/
+buildx64/
build-amiga/
tests/tmp/
msvc/Debug/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cca2a12..be3b53a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,7 +221,7 @@ IF (MSVC)
# /GF - String pooling
# /MP - Parallel build
- SET(CMAKE_C_FLAGS "/GF /MP /nologo ${CMAKE_C_FLAGS}")
+ SET(CMAKE_C_FLAGS "/GF /MP /wd4244 /wd4267 /nologo ${CMAKE_C_FLAGS}")
IF (STDCALL)
# /Gz - stdcall calling convention
diff --git a/src/revwalk.c b/src/revwalk.c
index edde661..f010936 100644
--- a/src/revwalk.c
+++ b/src/revwalk.c
@@ -82,9 +82,7 @@ static int process_commit(git_revwalk *walk, git_commit_list_node *commit, int h
int error;
if (!hide && walk->hide_cb)
- {
hide = walk->hide_cb(&commit->oid, walk->hide_cb_payload);
- }
if (hide && mark_uninteresting(commit) < 0)
return -1;
@@ -585,8 +583,7 @@ int git_revwalk_add_hide_cb(
if (walk->walking)
git_revwalk_reset(walk);
- if (walk->hide_cb)
- {
+ if (walk->hide_cb) {
/* There is already a callback added */
giterr_set(GITERR_INVALID, "There is already a callback added to hide commits in revision walker.");
return -1;
diff --git a/tests/revwalk/hidecb.c b/tests/revwalk/hidecb.c
index b674758..4c43f61 100644
--- a/tests/revwalk/hidecb.c
+++ b/tests/revwalk/hidecb.c
@@ -35,9 +35,7 @@ void test_revwalk_hidecb__initialize(void)
cl_git_pass(git_oid_fromstr(&_head_id, commit_head));
for (i = 0; i < commit_count; i++)
- {
cl_git_pass(git_oid_fromstr(&commit_ids[i], commit_strs[i]));
- }
}
@@ -73,7 +71,7 @@ static int hide_commit_cb(const git_oid *commit_id, void *data)
static int hide_commit_use_payload_cb(const git_oid *commit_id, void *data)
{
git_oid *hide_commit_id = data;
- if (0 == git_oid_cmp(commit_id, hide_commit_id))
+ if (git_oid_cmp(commit_id, hide_commit_id) == 0)
return 1;
else
return 0;
@@ -197,3 +195,4 @@ void test_revwalk_hidecb__test_payload(void)
git_revwalk_free(walk);
}
+