From 846953a7e8d1ce77a37d0b8f122ccde0fc5f1f59 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Jul 2011 11:04:39 +0000 Subject: [PATCH] Reacted on warning of cppcheck about libburn/read.c --- libburn/trunk/cdrskin/cdrskin_timestamp.h | 2 +- libburn/trunk/libburn/read.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libburn/trunk/cdrskin/cdrskin_timestamp.h b/libburn/trunk/cdrskin/cdrskin_timestamp.h index e1cd557e..efd19454 100644 --- a/libburn/trunk/cdrskin/cdrskin_timestamp.h +++ b/libburn/trunk/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2011.07.12.110306" +#define Cdrskin_timestamP "2011.07.12.110405" diff --git a/libburn/trunk/libburn/read.c b/libburn/trunk/libburn/read.c index 954a9f1a..0527aa1b 100644 --- a/libburn/trunk/libburn/read.c +++ b/libburn/trunk/libburn/read.c @@ -205,9 +205,11 @@ void burn_packet_process(struct burn_drive *d, unsigned char *data, const struct burn_read_opts *o) { unsigned char sub[96]; - unsigned short crc; int ptr = 2352, i, j, code, fb; int audio = 1; +#ifndef Libburn_no_crc_C + unsigned short crc; +#endif if (o->c2errors) { 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 + crc = (*(sub + 22) << 8) + *(sub + 23); if (crc != crc_ccitt(sub + 12, 10)) { burn_print(1, "sending error on %s %s\n", d->idata->vendor, d->idata->product);