Anonymous avatar Anonymous committed c0eb9cc Merge

Merge branch 'ab/clang-lints' into maint-1.7.7

* ab/clang-lints:
cast variable in call to free() in builtin/diff.c and submodule.c
apply: get rid of useless x < 0 comparison on a size_t type

Comments (0)

Files changed (3)

 	const char *last2 = s2 + n2 - 1;
 	int result = 0;
-	if (n1 < 0 || n2 < 0)
-		return 0;
 	/* ignore line endings */
 	while ((*last1 == '\r') || (*last1 == '\n'))
 		hashcpy((unsigned char *)(parent + i), ent[i].item->sha1);
 	diff_tree_combined(parent[0], parent + 1, ents - 1,
 			   revs->dense_combined_merges, revs);
-	free(parent);
+	free((void *)parent);
 	return 0;
 	rev.diffopt.format_callback_data = needs_pushing;
 	diff_tree_combined(commit->object.sha1, parents, n, 1, &rev);
-	free(parents);
+	free((void *)parents);
 int check_submodule_needs_pushing(unsigned char new_sha1[20], const char *remotes_name)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.