Skip to contentSkip to conversation

Fix sparse warnings

PATCH New Timo Hirvonen 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix sparse warnings

Make some functions static and convert func() function prototypes to to func(void). Fix declaration after statement, missing declaration and redundant declaration warnings.

---

 cache.h          |    1 +
 name-rev.c       |    2 --
 pack-redundant.c |   58 +++++++++++++++++++++++++++---------------------------
 path.c           |    2 +-
 4 files changed, 31 insertions(+), 32 deletions(-)

applies-to: e12ceef6841365e64bb765294235a67e9263d7de b29cab489ba0dbd6daf69b491978615a1a96f781

cache.h +1 -0
index a7c1bbd..c7c6637 100644
@@ -203,6 +203,7 @@ int git_mkstemp(char *path, size_t n, co
 
 int safe_create_leading_directories(char *path);
 char *safe_strncpy(char *, const char *, size_t);
+char *enter_repo(char *path, int strict);
 
 /* Read and unpack a sha1 file into memory, write memory to a sha1 file */
 extern int unpack_sha1_header(z_stream *stream, void *map, unsigned long mapsize, void *buffer, unsigned long size);
name-rev.c +0 -2
index 59194f1..817e36b 100644
@@ -230,8 +230,6 @@ int main(int argc, char **argv)
 				fwrite(p_start, p - p_start, 1, stdout);
 		}
 	} else if (all) {
-		extern struct object **objs;
-		extern int nr_objs;
 		int i;
 
 		for (i = 0; i < nr_objs; i++)
pack-redundant.c +29 -29

228 lines not on this page · raw message

path.c +1 -1
index d635470..84b3272 100644
@@ -131,7 +131,7 @@ int validate_symref(const char *path)
 	return -1;
 }
 
-static char *current_dir()
+static char *current_dir(void)
 {
 	return getcwd(pathname, sizeof(pathname));
 }

---
0.99.9.GIT