Commit acb159e1 by nulltoken

Fix MSVC compilation warnings

parent 7d93f96a
...@@ -73,7 +73,7 @@ int git_attr_get_many( ...@@ -73,7 +73,7 @@ int git_attr_get_many(
attr_get_many_info *info = NULL; attr_get_many_info *info = NULL;
size_t num_found = 0; size_t num_found = 0;
memset(values, 0, sizeof(const char *) * num_attr); memset((void *)values, 0, sizeof(const char *) * num_attr);
if ((error = git_attr_path__init(&path, pathname)) < GIT_SUCCESS || if ((error = git_attr_path__init(&path, pathname)) < GIT_SUCCESS ||
(error = collect_attr_files(repo, pathname, &files)) < GIT_SUCCESS) (error = collect_attr_files(repo, pathname, &files)) < GIT_SUCCESS)
......
...@@ -7,19 +7,21 @@ ...@@ -7,19 +7,21 @@
void test_attr_file__simple_read(void) void test_attr_file__simple_read(void)
{ {
git_attr_file *file = NULL; git_attr_file *file = NULL;
git_attr_assignment *assign;
git_attr_rule *rule;
cl_git_pass(git_attr_file__from_file(NULL, cl_fixture("attr/attr0"), &file)); cl_git_pass(git_attr_file__from_file(NULL, cl_fixture("attr/attr0"), &file));
cl_assert_strequal(cl_fixture("attr/attr0"), file->path); cl_assert_strequal(cl_fixture("attr/attr0"), file->path);
cl_assert(file->rules.length == 1); cl_assert(file->rules.length == 1);
git_attr_rule *rule = get_rule(0); rule = get_rule(0);
cl_assert(rule != NULL); cl_assert(rule != NULL);
cl_assert_strequal("*", rule->match.pattern); cl_assert_strequal("*", rule->match.pattern);
cl_assert(rule->match.length == 1); cl_assert(rule->match.length == 1);
cl_assert(rule->match.flags == 0); cl_assert(rule->match.flags == 0);
cl_assert(rule->assigns.length == 1); cl_assert(rule->assigns.length == 1);
git_attr_assignment *assign = get_assign(rule, 0); assign = get_assign(rule, 0);
cl_assert(assign != NULL); cl_assert(assign != NULL);
cl_assert_strequal("binary", assign->name); cl_assert_strequal("binary", assign->name);
cl_assert(assign->value == GIT_ATTR_TRUE); cl_assert(assign->value == GIT_ATTR_TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment