@matheusbsbs / matheus-bagliano / commits / fd99224eec
Fork 0

Declare no-arg functions as (void) in fast-import.

Apparently the git convention is to declare any function which takes no arguments as taking void. I did not do this during the early fast-import development, but should have. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Shawn O. Pearce committed Jan 17, 2007 at 01:47 UTC fd99224eec67d89f970b207e7db031b7c58e812e
1 file changed +18 -18
fast-import.c
+18 -18
@@ -561,7 +561,7 @@ static struct tree_content* grow_tree_content(
561 return r;
562 }
563
564 -static struct tree_entry* new_tree_entry()
564 +static struct tree_entry* new_tree_entry(void)
565 {
566 struct tree_entry *e;
567
@@ -589,7 +589,7 @@ static void release_tree_entry(struct tree_entry *e)
589 avail_tree_entry = e;
590 }
591
592 -static void start_packfile()
592 +static void start_packfile(void)
593 {
594 static char tmpfile[PATH_MAX];
595 struct packed_git *p;
@@ -618,7 +618,7 @@ static void start_packfile()
618 all_packs[pack_id] = p;
619 }
620
621 -static void fixup_header_footer()
621 +static void fixup_header_footer(void)
622 {
623 int pack_fd = pack_data->pack_fd;
624 SHA_CTX c;
@@ -659,7 +659,7 @@ static int oecmp (const void *a_, const void *b_)
659 return hashcmp(a->sha1, b->sha1);
660 }
661
662 -static char* create_index()
662 +static char* create_index(void)
663 {
664 static char tmpfile[PATH_MAX];
665 SHA_CTX ctx;
@@ -744,7 +744,7 @@ static char* keep_pack(char *curr_index_name)
744 return name;
745 }
746
747 -static void unkeep_all_packs()
747 +static void unkeep_all_packs(void)
748 {
749 static char name[PATH_MAX];
750 int k;
@@ -757,7 +757,7 @@ static void unkeep_all_packs()
757 }
758 }
759
760 -static void end_packfile()
760 +static void end_packfile(void)
761 {
762 struct packed_git *old_p = pack_data, *new_p;
763
@@ -806,7 +806,7 @@ static void end_packfile()
806 last_blob.depth = 0;
807 }
808
809 -static void checkpoint()
809 +static void checkpoint(void)
810 {
811 end_packfile();
812 start_packfile();
@@ -1253,7 +1253,7 @@ del_entry:
1253 return 1;
1254 }
1255
1256 -static void dump_branches()
1256 +static void dump_branches(void)
1257 {
1258 static const char *msg = "fast-import";
1259 unsigned int i;
@@ -1269,7 +1269,7 @@ static void dump_branches()
1269 }
1270 }
1271
1272 -static void dump_tags()
1272 +static void dump_tags(void)
1273 {
1274 static const char *msg = "fast-import";
1275 struct tag *t;
@@ -1304,7 +1304,7 @@ static void dump_marks_helper(FILE *f,
1304 }
1305 }
1306
1307 -static void dump_marks()
1307 +static void dump_marks(void)
1308 {
1309 if (mark_file)
1310 {
@@ -1314,12 +1314,12 @@ static void dump_marks()
1314 }
1315 }
1316
1317 -static void read_next_command()
1317 +static void read_next_command(void)
1318 {
1319 read_line(&command_buf, stdin, '\n');
1320 }
1321
1322 -static void cmd_mark()
1322 +static void cmd_mark(void)
1323 {
1324 if (!strncmp("mark :", command_buf.buf, 6)) {
1325 next_mark = strtoumax(command_buf.buf + 6, NULL, 10);
@@ -1355,7 +1355,7 @@ static void* cmd_data (size_t *size)
1355 return buffer;
1356 }
1357
1358 -static void cmd_new_blob()
1358 +static void cmd_new_blob(void)
1359 {
1360 size_t l;
1361 void *d;
@@ -1368,7 +1368,7 @@ static void cmd_new_blob()
1368 free(d);
1369 }
1370
1371 -static void unload_one_branch()
1371 +static void unload_one_branch(void)
1372 {
1373 while (cur_active_branches
1374 && cur_active_branches >= max_active_branches) {
@@ -1601,7 +1601,7 @@ static struct hash_list* cmd_merge(unsigned int *count)
1601 return list;
1602 }
1603
1604 -static void cmd_new_commit()
1604 +static void cmd_new_commit(void)
1605 {
1606 struct branch *b;
1607 void *msg;
@@ -1715,7 +1715,7 @@ static void cmd_new_commit()
1715 }
1716 }
1717
1718 -static void cmd_new_tag()
1718 +static void cmd_new_tag(void)
1719 {
1720 char *str_uq;
1721 const char *endp;
@@ -1824,7 +1824,7 @@ static void cmd_new_tag()
1824 }
1825 }
1826
1827 -static void cmd_reset_branch()
1827 +static void cmd_reset_branch(void)
1828 {
1829 struct branch *b;
1830 char *str_uq;
@@ -1855,7 +1855,7 @@ static void cmd_reset_branch()
1855 cmd_from(b);
1856 }
1857
1858 -static void cmd_checkpoint()
1858 +static void cmd_checkpoint(void)
1859 {
1860 if (object_count)
1861 checkpoint();