diff options
| author | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-11 22:51:42 +0000 |
|---|---|---|
| committer | Ramsay Jones <ramsay@ramsay1.demon.co.uk> | 2010-01-20 20:19:55 +0000 |
| commit | 1a7bae4d0f9d9314b905109b5b321219b7e6be3b (patch) | |
| tree | 81723c22eae0570f3774ac588b572636f34a7467 /src/odb.c | |
| parent | e3fe32b6a4ecb340fa7c9802285711cc52b8a101 (diff) | |
| download | libgit2-1a7bae4d0f9d9314b905109b5b321219b7e6be3b.tar.gz | |
Fix some "unused parameter" warnings with -Wextra
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Diffstat (limited to 'src/odb.c')
| -rw-r--r-- | src/odb.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1110,6 +1110,8 @@ static int read_packed(git_obj *out, git_pack *p, const git_oid *id) off_t pos; int res; + assert(out && p && id); + if (pack_openidx(p)) return GIT_ERROR; res = p->idx_search(&pos, p, id); @@ -1128,6 +1130,12 @@ int git_odb__read_packed(git_obj *out, git_odb *db, const git_oid *id) git_packlist *pl = packlist_get(db); size_t j; + assert(out && db && id); + + out->data = NULL; + out->len = 0; + out->type = GIT_OBJ_BAD; + if (!pl) return GIT_ENOTFOUND; |
