Remove some cppcheck style warnings

This commit is contained in:
R. Bernstein
2009-10-27 21:28:11 -04:00
parent b43dc9cd98
commit 3844f42df8
8 changed files with 9 additions and 16 deletions

View File

@@ -153,8 +153,8 @@ main(int argc, const char *argv[])
if (psz_mes || psz_err) if (psz_mes || psz_err)
printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: "");
if (psz_err) free(psz_err); free(psz_err);
if (psz_mes) free(psz_mes); free(psz_mes);
if( !p_readbuf ) { if( !p_readbuf ) {
printf("paranoia read error. Stopping.\n"); printf("paranoia read error. Stopping.\n");
break; break;

View File

@@ -176,7 +176,6 @@ data_bigendianp(cdrom_drive_t *d)
cdmessage(d,"\n\tCannot determine CDROM drive endianness.\n"); cdmessage(d,"\n\tCannot determine CDROM drive endianness.\n");
return(bigendianp()); return(bigendianp());
return(-1);
} }
} }

View File

@@ -266,7 +266,7 @@ static void dradf4(int ido,int l1,float *cc,float *ch,float *wa1,
static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){ static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
int i,k1,l1,l2; int i,k1,l1,l2;
int na,kh,nf; int na,kh,nf;
int ip,iw,ido,idl1,ix2,ix3; int ip,iw,ido,ix2,ix3;
nf=ifac[1]; nf=ifac[1];
na=1; na=1;
@@ -278,7 +278,6 @@ static void drftf1(int n,float *c,float *ch,float *wa,int *ifac){
ip=ifac[kh+1]; ip=ifac[kh+1];
l1=l2/ip; l1=l2/ip;
ido=n/l2; ido=n/l2;
idl1=ido*l1;
iw-=(ip-1)*ido; iw-=(ip-1)*ido;
na=1-na; na=1-na;
@@ -466,7 +465,7 @@ static void dradb4(int ido,int l1,float *cc,float *ch,float *wa1,
static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){ static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
int i,k1,l1,l2; int i,k1,l1,l2;
int na; int na;
int nf,ip,iw,ix2,ix3,ido,idl1; int nf,ip,iw,ix2,ix3,ido;
nf=ifac[1]; nf=ifac[1];
na=0; na=0;
@@ -477,7 +476,6 @@ static void drftb1(int n, float *c, float *ch, float *wa, int *ifac){
ip=ifac[k1 + 2]; ip=ifac[k1 + 2];
l2=ip*l1; l2=ip*l1;
ido=n/l2; ido=n/l2;
idl1=ido*l1;
if(ip!=4)goto L103; if(ip!=4)goto L103;
ix2=iw+ido; ix2=iw+ido;
ix3=ix2+ido; ix3=ix2+ido;

View File

@@ -81,10 +81,10 @@ test_read(cdrom_drive *d, void *p, long begin, long sectors)
#if defined(CDDA_TEST_SEEKJITTER) \ #if defined(CDDA_TEST_SEEKJITTER) \
|| defined(CDDA_TEST_ALLJITTER) \ || defined(CDDA_TEST_ALLJITTER) \
|| defined(CDDA_TEST_SOMEJITTER) || defined(CDDA_TEST_SOMEJITTER)
int jitter_flag=0; int jitter_flag;
#endif #endif
int los_flag=0; int los_flag;
static int jitter=0; static int jitter=0;
int bytes_so_far=0; int bytes_so_far=0;
long bytestotal; long bytestotal;
@@ -172,7 +172,6 @@ test_read(cdrom_drive *d, void *p, long begin, long sectors)
#endif #endif
if(this_bytes>inner_bytes)this_bytes=inner_bytes;
if(begin+jitter+bytes_so_far<0)jitter=0; if(begin+jitter+bytes_so_far<0)jitter=0;
seeki=begin+bytes_so_far+jitter; seeki=begin+bytes_so_far+jitter;

View File

@@ -660,10 +660,8 @@ static int do_umount(char * target) {
execlp("pumount", "pumount", target, NULL); execlp("pumount", "pumount", target, NULL);
execlp("umount", "umount", target, NULL); execlp("umount", "umount", target, NULL);
return -1; return -1;
break;
case -1: case -1:
return -1; return -1;
break;
default: /* parent */ default: /* parent */
wait(&status); wait(&status);
if (WIFEXITED(status) == 0) { if (WIFEXITED(status) == 0) {

View File

@@ -257,7 +257,7 @@ parse_cuefile (_img_private_t *cd, const char *psz_cue_name)
/* The below declarations may be unique to this image-parse routine. */ /* The below declarations may be unique to this image-parse routine. */
int start_index; int start_index;
bool b_first_index_for_track=false; bool b_first_index_for_track;
if (NULL == psz_cue_name) if (NULL == psz_cue_name)
return false; return false;

View File

@@ -507,7 +507,6 @@ parse_nrg (_img_private_t *p_env, const char *psz_nrg_name,
opcode==NERO_ID ? 'O': '5'); opcode==NERO_ID ? 'O': '5');
free(footer_buf); free(footer_buf);
return false; return false;
break;
case END1_ID: /* "END!" */ case END1_ID: /* "END!" */
cdio_debug ("nrg end tag detected"); cdio_debug ("nrg end tag detected");

View File

@@ -133,8 +133,8 @@ main(int argc, const char *argv[])
if (psz_mes || psz_err) if (psz_mes || psz_err)
printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: ""); printf("%s%s\n", psz_mes ? psz_mes: "", psz_err ? psz_err: "");
if (psz_err) free(psz_err); free(psz_err);
if (psz_mes) free(psz_mes); free(psz_mes);
if( !p_readbuf ) { if( !p_readbuf ) {
printf("paranoia read error. Stopping.\n"); printf("paranoia read error. Stopping.\n");
goto out; goto out;