Skip to content

Commit d8e1d03

Browse files
committed
Fix two warnings from Clang
Both are about not reading the value stored in a variable. Signed-off-by: Carlos Martín Nieto <[email protected]>
1 parent cc3b82e commit d8e1d03

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/commit.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ int commit_parse_buffer(git_commit *commit, const void *data, size_t len)
286286

287287
if (buffer < buffer_end) {
288288
const char *line_end;
289-
size_t message_len = buffer_end - buffer;
289+
size_t message_len;
290290

291291
/* Long message */
292292
message_len = buffer_end - buffer;

src/odb_loose.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ static int inflate_disk_obj(git_rawobj *out, gitfo_buf *obj)
336336
{
337337
unsigned char head[64], *buf;
338338
z_stream zs;
339-
int z_status;
340339
obj_hdr hdr;
341340
size_t used;
342341

@@ -350,7 +349,7 @@ static int inflate_disk_obj(git_rawobj *out, gitfo_buf *obj)
350349
* inflate the initial part of the io buffer in order
351350
* to parse the object header (type and size).
352351
*/
353-
if ((z_status = start_inflate(&zs, obj, head, sizeof(head))) < Z_OK)
352+
if (start_inflate(&zs, obj, head, sizeof(head)) < Z_OK)
354353
return GIT_ERROR;
355354

356355
if ((used = get_object_header(&hdr, head)) == 0)

0 commit comments

Comments
 (0)