mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
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<sizeof(prefix); i++) { | ^ ../../../lib/tdb/tools/tdbrestore.c: In function ‘read_data’: ../../../lib/tdb/tools/tdbrestore.c:95:13: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 95 | for (i=0; i<size; i++) { | ^ Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
committed by
Volker Lendecke
parent
6fc0a48626
commit
cfd34eef58
@ -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) {
|
||||
|
Reference in New Issue
Block a user