Skip to content

Commit 962554c

Browse files
tihirvonJunio C Hamano
authored andcommitted
Use setenv(), fix warnings
- Fix -Wundef -Wold-style-definition warnings - Make pll_free() static [jc: original patch by Timo had another unrelated bits: - Use setenv() instead of putenv() I'm postponing that part for now.] Signed-off-by: Timo Hirvonen <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3c0b751 commit 962554c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

cache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#define deflateBound(c,s) ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
1111
#endif
1212

13-
#if defined(DT_UNKNOWN) && !NO_D_TYPE_IN_DIRENT
13+
#if defined(DT_UNKNOWN) && !defined(NO_D_TYPE_IN_DIRENT)
1414
#define DTYPE(de) ((de)->d_type)
1515
#else
1616
#undef DT_UNKNOWN

exec_cmd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ void git_set_exec_path(const char *exec_path)
1313

1414

1515
/* Returns the highest-priority, location to look for git programs. */
16-
const char *git_exec_path()
16+
const char *git_exec_path(void)
1717
{
1818
const char *env;
1919

fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ static void mark_common(struct commit *commit,
8282
Get the next rev to send, ignoring the common.
8383
*/
8484

85-
static const unsigned char* get_rev()
85+
static const unsigned char* get_rev(void)
8686
{
8787
struct commit *commit = NULL;
8888

fsck-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static int check_strict = 0;
2020
static int keep_cache_objects = 0;
2121
static unsigned char head_sha1[20];
2222

23-
#if NO_D_INO_IN_DIRENT
23+
#ifdef NO_D_INO_IN_DIRENT
2424
#define SORT_DIRENT 0
2525
#define DIRENT_SORT_HINT(de) 0
2626
#else

pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ static int sha1_sort(const struct object_entry *a, const struct object_entry *b)
768768
return memcmp(a->sha1, b->sha1, 20);
769769
}
770770

771-
static struct object_entry **create_final_object_list()
771+
static struct object_entry **create_final_object_list(void)
772772
{
773773
struct object_entry **list;
774774
int i, j;

pack-redundant.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static inline void llist_item_put(struct llist_item *item)
4545
free_nodes = item;
4646
}
4747

48-
static inline struct llist_item *llist_item_get()
48+
static inline struct llist_item *llist_item_get(void)
4949
{
5050
struct llist_item *new;
5151
if ( free_nodes ) {
@@ -275,7 +275,7 @@ static void cmp_two_packs(struct pack_list *p1, struct pack_list *p2)
275275
}
276276
}
277277

278-
void pll_free(struct pll *l)
278+
static void pll_free(struct pll *l)
279279
{
280280
struct pll *old;
281281
struct pack_list *opl;

0 commit comments

Comments
 (0)