From 599b88fd14123f93a913b5b0c0aea57c12adb56f Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 19 Jan 2008 02:08:27 +0000 Subject: [PATCH] Cast to integer because function it seems really might not be paranoia_mode_t but seems augmented by to additional values below 0. Ugh. --- src/cd-paranoia/cd-paranoia.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/cd-paranoia/cd-paranoia.c b/src/cd-paranoia/cd-paranoia.c index 73885ba2..84018cdf 100644 --- a/src/cd-paranoia/cd-paranoia.c +++ b/src/cd-paranoia/cd-paranoia.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2005, 2006, 2007 Rocky Bernstein + * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rocky Bernstein * (C) 1998 Monty * * This program is free software; you can redistribute it and/or modify @@ -368,10 +368,11 @@ callback(long int inpos, paranoia_cb_mode_t function) static int stimeout=0; const char *smilie="= :-)"; - if(callscript) - fprintf(stderr,"##: %d [%s] @ %ld\n", - function,(function>=-2&&function<=13?callback_strings[function+2]: - ""),inpos); + if (callscript) + fprintf(stderr, "##: %d [%s] @ %ld\n", + function, ((int) function >= -2 && (int) function <= 13 ? + callback_strings[function+2] : ""), + inpos); if(!quiet){ long test;