mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-30 22:24:56 +00:00
clar: Fix warnings
This commit is contained in:
parent
31eed56b9e
commit
8c4c357f18
@ -537,7 +537,7 @@ static int oid_for_tree_path(git_oid *out, git_tree *tree, git_repository *repo,
|
|||||||
char *tok;
|
char *tok;
|
||||||
void *alloc = str;
|
void *alloc = str;
|
||||||
git_tree *tree2 = tree;
|
git_tree *tree2 = tree;
|
||||||
const git_tree_entry *entry;
|
const git_tree_entry *entry = NULL;
|
||||||
|
|
||||||
while ((tok = git__strtok(&str, "/\\")) != NULL) {
|
while ((tok = git__strtok(&str, "/\\")) != NULL) {
|
||||||
entry = git_tree_entry_byname(tree2, tok);
|
entry = git_tree_entry_byname(tree2, tok);
|
||||||
|
@ -89,7 +89,8 @@ void test_object_tree_write__subtree(void)
|
|||||||
void test_object_tree_write__sorted_subtrees(void)
|
void test_object_tree_write__sorted_subtrees(void)
|
||||||
{
|
{
|
||||||
git_treebuilder *builder;
|
git_treebuilder *builder;
|
||||||
unsigned int i, position_c, position_cake, position_config;
|
unsigned int i;
|
||||||
|
int position_c = -1, position_cake = -1, position_config = -1;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int attr;
|
unsigned int attr;
|
||||||
@ -140,6 +141,10 @@ void test_object_tree_write__sorted_subtrees(void)
|
|||||||
position_config = i;
|
position_config = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cl_assert(position_c != -1);
|
||||||
|
cl_assert(position_cake != -1);
|
||||||
|
cl_assert(position_config != -1);
|
||||||
|
|
||||||
cl_assert(position_c < position_cake);
|
cl_assert(position_c < position_cake);
|
||||||
cl_assert(position_cake < position_config);
|
cl_assert(position_cake < position_config);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "clar_libgit2.h"
|
#include "clar_libgit2.h"
|
||||||
#include "vector.h"
|
#include "vector.h"
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
static git_repository *_repo;
|
static git_repository *_repo;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user