Reacted on warning of cppcheck about libburn/read.c

This commit is contained in:
Thomas Schmitt 2011-07-12 11:04:39 +00:00
parent a751af6caa
commit ec9bc5678b
2 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2011.07.12.110306" #define Cdrskin_timestamP "2011.07.12.110405"

View File

@ -205,9 +205,11 @@ void burn_packet_process(struct burn_drive *d, unsigned char *data,
const struct burn_read_opts *o) const struct burn_read_opts *o)
{ {
unsigned char sub[96]; unsigned char sub[96];
unsigned short crc;
int ptr = 2352, i, j, code, fb; int ptr = 2352, i, j, code, fb;
int audio = 1; int audio = 1;
#ifndef Libburn_no_crc_C
unsigned short crc;
#endif
if (o->c2errors) { if (o->c2errors) {
fb = bitcount(data + ptr, 294); fb = bitcount(data + ptr, 294);
@ -253,9 +255,9 @@ void burn_packet_process(struct burn_drive *d, unsigned char *data,
} }
} }
} }
crc = (*(sub + 22) << 8) + *(sub + 23);
#ifndef Libburn_no_crc_C #ifndef Libburn_no_crc_C
crc = (*(sub + 22) << 8) + *(sub + 23);
if (crc != crc_ccitt(sub + 12, 10)) { if (crc != crc_ccitt(sub + 12, 10)) {
burn_print(1, "sending error on %s %s\n", burn_print(1, "sending error on %s %s\n",
d->idata->vendor, d->idata->product); d->idata->vendor, d->idata->product);