From: Martin Schwenke Date: Thu, 7 May 2020 06:57:07 +0000 (+1000) Subject: tdb: Fix some signed/unsigned comparisons X-Git-Tag: talloc-2.3.2~1107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd34eef58577480ff546df44a210c8b98936387;p=thirdparty%2Fsamba.git tdb: Fix some signed/unsigned comparisons [207/389] Compiling lib/tdb/tools/tdbdump.c ../../../lib/tdb/tools/tdbrestore.c: In function ‘read_linehead’: ../../../lib/tdb/tools/tdbrestore.c:43:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare] 43 | for (i=0; i Reviewed-by: Volker Lendecke --- diff --git a/lib/tdb/tools/tdbrestore.c b/lib/tdb/tools/tdbrestore.c index 81c986c6003..9d5146272cc 100644 --- a/lib/tdb/tools/tdbrestore.c +++ b/lib/tdb/tools/tdbrestore.c @@ -27,7 +27,8 @@ static int read_linehead(FILE *f) { - int i, c; + size_t i; + int c; int num_bytes; char prefix[128]; @@ -84,7 +85,7 @@ static int read_hex(void) { static int read_data(FILE *f, TDB_DATA *d, size_t size) { int c, low, high; - int i; + size_t i; d->dptr = (unsigned char *)malloc(size); if (d->dptr == NULL) {