Reacted on -Wsign-compare warnings of gcc

1.1.0
Thomas Schmitt 12 years ago
parent e9637067f8
commit ac665916a6
  1. 2
      cdrskin/cdrskin_timestamp.h
  2. 10
      libburn/drive.c
  3. 4
      libburn/init.c
  4. 10
      libburn/mmc.c
  5. 6
      libburn/sg-linux.c
  6. 2
      libburn/structure.c

@ -1 +1 @@
#define Cdrskin_timestamP "2011.05.12.120503"
#define Cdrskin_timestamP "2011.05.12.134723"

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -1092,7 +1092,7 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
*n_drives = 0;
/* ts A70907 : wether to scan from scratch or to extend */
for (i = 0; i < sizeof(scanned); i++)
for (i = 0; i < (int) sizeof(scanned); i++)
scanned[i] = 0;
if (flag & 1) {
burn_drive_free_all();
@ -1120,12 +1120,12 @@ int burn_drive_scan_sync(struct burn_drive_info *drives[],
"Out of virtual memory", 0, 0);
return -1;
} else
for (i = 0; i <= count; i++) /* invalidate */
for (i = 0; i <= (int) count; i++) /* invalidate */
(*drives)[i].drive = NULL;
} else
*drives = NULL;
for (i = 0; i < count; ++i) {
for (i = 0; i < (int) count; ++i) {
if (scanned[i / 8] & (1 << (i % 8)))
continue; /* device already scanned by previous run */
if (drive_array[i].global_index < 0)
@ -1773,7 +1773,7 @@ int burn_drive_resolve_link(char *path, char adr[], int *recursion_count,
path);
return 0;
}
if (ret >= sizeof(link_target) - 1) {
if (ret >= (int) sizeof(link_target) - 1) {
sprintf(msg,"readlink( %s ) returns %d (too much)", path, ret);
if (flag & 1)
burn_drive_adr_debug_msg(msg, NULL);

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -354,7 +354,7 @@ char *burn_util_thread_id(pid_t pid, pthread_t tid, char text[80])
sprintf(text, "[%lu,", (unsigned long int) getpid());
l= strlen(text);
for(i= 0; i < sizeof(pthread_t) && 2 * i < 80 - l - 3; i++)
for(i= 0; i < ((int) sizeof(pthread_t)) && 2 * i < 80 - l - 3; i++)
sprintf(text + l + 2 * i,
"%2.2X", ((unsigned char *) &tid)[i]);

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -768,9 +768,9 @@ static int mmc_wait_for_buffer_free(struct burn_drive *d, struct buffer *buf)
/* >>> learn about buffer progress and adjust usec */
if (usec < d->wfb_min_usec)
if (usec < (int) d->wfb_min_usec)
usec = d->wfb_min_usec;
else if (usec > d->wfb_max_usec)
else if (usec > (int) d->wfb_max_usec)
usec = d->wfb_max_usec;
usleep(usec);
if (d->waited_usec < 0xf0000000)
@ -3759,9 +3759,9 @@ static int mmc_get_write_performance_al(struct burn_drive *d,
sd->read_speed = read_speed;
}
if (end_lba > d->mdata->max_end_lba)
if ((int) end_lba > d->mdata->max_end_lba)
d->mdata->max_end_lba = end_lba;
if (end_lba < d->mdata->min_end_lba)
if ((int) end_lba < d->mdata->min_end_lba)
d->mdata->min_end_lba = end_lba;
if (write_speed < min_write_speed)
min_write_speed = write_speed;

@ -1,7 +1,7 @@
/* -*- indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; -*- */
/* Copyright (c) 2004 - 2006 Derek Foreman, Ben Jansens
Copyright (c) 2006 - 2010 Thomas Schmitt <scdbackup@gmx.net>
Copyright (c) 2006 - 2011 Thomas Schmitt <scdbackup@gmx.net>
Provided under GPL version 2 or later.
*/
@ -1133,7 +1133,7 @@ static int proc_sys_dev_cdrom_info(char ***list, int *count, int flag)
if (*cpt == 0 || *cpt == '\n')
break;
sscanf(cpt, "%s", fname + 5);
if (strlen(fname) > maxl)
if ((int) strlen(fname) > maxl)
maxl = strlen(fname);
if (pass == 1)
strcpy((*list)[*count], fname);
@ -1369,7 +1369,7 @@ next_proc_info:;
if ((idx->info_list)[i][0] == 0)
continue;
if (baseno == idx->pos) {
if (adr_size < strlen((idx->info_list)[i]) + 1)
if (adr_size < (int) strlen((idx->info_list)[i]) + 1)
return -1;
strcpy(adr, (idx->info_list)[i]);
return 1;

@ -33,7 +33,7 @@ extern struct libdax_msgs *libdax_messenger;
return 0;\
if (pos == BURN_POS_END)\
pos = TO->NEW##s;\
if (pos > TO->NEW##s)\
if ((int) pos > TO->NEW##s)\
return 0;\
\
tmp = realloc(TO->NEW, sizeof(struct NEW *) * (TO->NEW##s + 1));\

Loading…
Cancel
Save