diff options
| author | lhchavez <lhchavez@lhchavez.com> | 2021-02-23 19:33:34 -0800 |
|---|---|---|
| committer | lhchavez <lhchavez@lhchavez.com> | 2021-08-08 19:08:59 -0700 |
| commit | 231ca4fad36ce7b3dd5d79b599be46ab6001fc18 (patch) | |
| tree | 6616d81c71b873f122134f046073defcc4f659c2 /src/odb.c | |
| parent | 9eb17d460cd681bbc14d56ed8fdf440bc69b5456 (diff) | |
| download | libgit2-231ca4fad36ce7b3dd5d79b599be46ab6001fc18.tar.gz | |
Proof-of-concept for a more aggressive GIT_UNUSED()
This adds a `-Wunused-result`-proof `GIT_UNUSED()`, just to demonstrate
that it works. With this, sortedcache.h is now completely
`GIT_WARN_UNUSED_RESULT`-annotated!
Diffstat (limited to 'src/odb.c')
| -rw-r--r-- | src/odb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -573,7 +573,7 @@ int git_odb__add_default_backends( git_odb *db, const char *objects_dir, bool as_alternates, int alternate_depth) { - size_t i; + size_t i = 0; struct stat st; ino_t inode; git_odb_backend *loose, *packed; @@ -582,7 +582,7 @@ int git_odb__add_default_backends( * a cross-platform workaround for this */ #ifdef GIT_WIN32 GIT_UNUSED(i); - GIT_UNUSED(st); + GIT_UNUSED(&st); inode = 0; #else |
