Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArkadiy Shapkin <ashapkin@artec-group.com>2013-03-17 04:46:46 +0400
committerArkadiy Shapkin <ashapkin@artec-group.com>2013-03-18 03:30:26 +0400
commit10c06114cbb1c384b7de3cca6d6601ee750f5178 (patch)
tree05b4c66610443dd41b50114480da9e8b7e99a123 /src/odb_pack.c
parenta5f6138407efb6d8866fe8de5aac13454aefcd82 (diff)
Several warnings detected by static code analyzer fixed
Implicit type conversion argument of function to size_t type Suspicious sequence of types castings: size_t -> int -> size_t Consider reviewing the expression of the 'A = B == C' kind. The expression is calculated as following: 'A = (B == C)' Unsigned type is never < 0
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index 7e6828eae..7240a4ac7 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -195,7 +195,7 @@ static int packfile_load__cb(void *_data, git_buf *path)
struct pack_backend *backend = (struct pack_backend *)_data;
struct git_pack_file *pack;
int error;
- unsigned int i;
+ size_t i;
if (git__suffixcmp(path->ptr, ".idx") != 0)
return 0; /* not an index */
@@ -222,7 +222,7 @@ static int pack_entry_find_inner(
const git_oid *oid,
struct git_pack_file *last_found)
{
- unsigned int i;
+ size_t i;
if (last_found &&
git_pack_entry_find(e, last_found, oid, GIT_OID_HEXSZ) == 0)
@@ -266,7 +266,7 @@ static unsigned pack_entry_find_prefix_inner(
struct git_pack_file *last_found)
{
int error;
- unsigned int i;
+ size_t i;
unsigned found = 0;
if (last_found) {
@@ -510,7 +510,7 @@ static int pack_backend__writepack(struct git_odb_writepack **out,
static void pack_backend__free(git_odb_backend *_backend)
{
struct pack_backend *backend;
- unsigned int i;
+ size_t i;
assert(_backend);