From ed8b303d629049dc6dba253ba253079a898d4ba1 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 6 Jul 2011 14:25:57 +0000 Subject: [PATCH] Reacted on warnings of -Wunused-but-set-variable --- cdrskin/cdrskin_timestamp.h | 2 +- libburn/async.c | 3 +-- libburn/init.h | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cdrskin/cdrskin_timestamp.h b/cdrskin/cdrskin_timestamp.h index c37c1d6..fe394e3 100644 --- a/cdrskin/cdrskin_timestamp.h +++ b/cdrskin/cdrskin_timestamp.h @@ -1 +1 @@ -#define Cdrskin_timestamP "2011.07.04.171649" +#define Cdrskin_timestamP "2011.07.06.142532" diff --git a/libburn/async.c b/libburn/async.c index d4c3d91..4a7eae2 100644 --- a/libburn/async.c +++ b/libburn/async.c @@ -585,7 +585,6 @@ static void *write_disc_worker_func(struct w_list *w) void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc) { - int ret; struct write_opts o; char *reasons= NULL; struct burn_drive *d; @@ -648,7 +647,7 @@ void burn_disc_write(struct burn_write_opts *opts, struct burn_disc *disc) tests in burn_*_write_sync() */ - BURN_ALLOC_MEM(reasons, char, BURN_REASONS_LEN + 80); + BURN_ALLOC_MEM_VOID(reasons, char, BURN_REASONS_LEN + 80); strcpy(reasons, "Write job parameters are unsuitable:\n"); if (burn_precheck_write(opts, disc, reasons + strlen(reasons), 1) <= 0) { diff --git a/libburn/init.h b/libburn/init.h index 6370d49..813219d 100644 --- a/libburn/init.h +++ b/libburn/init.h @@ -36,6 +36,12 @@ void *burn_alloc_mem(size_t size, size_t count, int flag); ret= -1; goto ex; \ } } +#define BURN_ALLOC_MEM_VOID(pt, typ, count) { \ + pt= (typ *) burn_alloc_mem(sizeof(typ), (size_t) (count), 0); \ + if(pt == NULL) { \ + goto ex; \ + } } + #define BURN_FREE_MEM(pt) { \ if(pt != NULL) \ free((char *) pt); \