summaryrefslogtreecommitdiff
path: root/repository.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsayjones.plus.com>2017-11-28 03:01:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-28 03:37:37 (GMT)
commitc250e02e2c6de8c116f4320a48ce44bbdb43015c (patch)
tree5b5ff37d079cf9269d82dfd0751c1ce875731c0a /repository.c
parenteb0ccfd7f5ce1765ada74abf272f002e1e34d1e4 (diff)
downloadgit-c250e02e2c6de8c116f4320a48ce44bbdb43015c.zip
git-c250e02e2c6de8c116f4320a48ce44bbdb43015c.tar.gz
git-c250e02e2c6de8c116f4320a48ce44bbdb43015c.tar.bz2
repository: fix a sparse 'using integer as NULL pointer' warning
Commit 78a6766802 ("Integrate hash algorithm support with repo setup", 2017-11-12) added a 'const struct git_hash_algo *hash_algo' field to the repository structure, without modifying the initializer of the 'the_repo' variable. This does not actually introduce a bug, since the '0' initializer for the 'ignore_env:1' bit-field is interpreted as a NULL pointer (hence the warning), and the final field (now with no initializer) receives a default '0'. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repository.c')
-rw-r--r--repository.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/repository.c b/repository.c
index c6ceb9f..998413b 100644
--- a/repository.c
+++ b/repository.c
@@ -5,7 +5,7 @@
/* The main repository */
static struct repository the_repo = {
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, 0, 0
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &the_index, NULL, 0, 0
};
struct repository *the_repository = &the_repo;