Skip to content

Commit 7985fa5

Browse files
committed
Merge branch 'ps/build-sign-compare' into seen
Start working to make the codebase buildable with -Wsign-compare. * ps/build-sign-compare: sign-compare: 32-bit support
2 parents 0578239 + cc1bfd9 commit 7985fa5

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

csum-file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ static void verify_buffer_or_die(struct hashfile *f,
2323

2424
if (ret < 0)
2525
die_errno("%s: sha1 file read error", f->name);
26-
if (ret != count)
26+
if ((size_t)ret != (size_t)count)
2727
die("%s: sha1 file truncated", f->name);
2828
if (memcmp(buf, f->check_buffer, count))
2929
die("sha1 file '%s' validation error", f->name);

git.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define USE_THE_REPOSITORY_VARIABLE
2+
#define DISABLE_SIGN_COMPARE_WARNINGS
23

34
#include "builtin.h"
45
#include "config.h"

oss-fuzz/fuzz-parse-attr-line.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#define DISABLE_SIGN_COMPARE_WARNINGS
2+
13
#include "git-compat-util.h"
24
#include <stddef.h>
35
#include <stdlib.h>

pkt-line.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ static int get_packet_data(int fd, char **src_buf, size_t *src_size,
360360
}
361361

362362
/* And complain if we didn't get enough bytes to satisfy the read. */
363-
if (ret != size) {
363+
if ((size_t)ret != (size_t)size) {
364364
if (options & PACKET_READ_GENTLE_ON_EOF)
365365
return -1;
366366

0 commit comments

Comments
 (0)