Updates for compliance with gcc v10 and squash some warnings

This commit is contained in:
Bill Somerville 2020-05-07 14:57:05 +01:00
parent 268deb31fb
commit cf6893e56b
6 changed files with 17 additions and 20 deletions

View File

@ -31,7 +31,7 @@ subroutine ft4_downsample(dd,newdata,f0,c)
if(newdata) then
x=dd
call four2a(x,NMAX,1,-1,0) !r2c FFT to freq domain
call four2a(cx,NMAX,1,-1,0) !r2c FFT to freq domain
endif
i0=nint(f0/df)
c1=0.

View File

@ -35,7 +35,7 @@ subroutine filt8(f0,nslots,width,wave)
!###
if(nslots.ne.99) return
x=wave
call four2a(x,NFFT,1,-1,0) !r2c
call four2a(cx,NFFT,1,-1,0) !r2c
do i=0,NH
s1(i)=real(cx(i))**2 + aimag(cx(i))**2
enddo

View File

@ -9,7 +9,7 @@ subroutine foxfilt(nslots,nfreq,width,wave)
x(1:NWAVE)=wave
x(NWAVE+1:)=0.
call four2a(x,NFFT,1,-1,0) !r2c
call four2a(cx,NFFT,1,-1,0) !r2c
df=48000.0/NFFT
fa=nfreq - 0.5*6.25
fb=nfreq + 7.5*6.25 + (nslots-1)*60.0

View File

@ -10,8 +10,6 @@ struct snode {
unsigned int jpointer;
};
struct snode *stack;
int jelinek(unsigned int *metric,
unsigned int *cycles,
unsigned char *data,

View File

@ -348,17 +348,17 @@ uint32_t nhash( const void *key, size_t length, uint32_t initval)
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
{
case 12: c+=((uint32_t)k[11])<<24;
case 11: c+=((uint32_t)k[10])<<16;
case 10: c+=((uint32_t)k[9])<<8;
case 9 : c+=k[8];
case 8 : b+=((uint32_t)k[7])<<24;
case 7 : b+=((uint32_t)k[6])<<16;
case 6 : b+=((uint32_t)k[5])<<8;
case 5 : b+=k[4];
case 4 : a+=((uint32_t)k[3])<<24;
case 3 : a+=((uint32_t)k[2])<<16;
case 2 : a+=((uint32_t)k[1])<<8;
case 12: c+=((uint32_t)k[11])<<24; __attribute__ ((fallthrough));
case 11: c+=((uint32_t)k[10])<<16; __attribute__ ((fallthrough));
case 10: c+=((uint32_t)k[9])<<8; __attribute__ ((fallthrough));
case 9 : c+=k[8]; __attribute__ ((fallthrough));
case 8 : b+=((uint32_t)k[7])<<24; __attribute__ ((fallthrough));
case 7 : b+=((uint32_t)k[6])<<16; __attribute__ ((fallthrough));
case 6 : b+=((uint32_t)k[5])<<8; __attribute__ ((fallthrough));
case 5 : b+=k[4]; __attribute__ ((fallthrough));
case 4 : a+=((uint32_t)k[3])<<24; __attribute__ ((fallthrough));
case 3 : a+=((uint32_t)k[2])<<16; __attribute__ ((fallthrough));
case 2 : a+=((uint32_t)k[1])<<8; __attribute__ ((fallthrough));
case 1 : a+=k[0];
break;
case 0 : return c;

View File

@ -748,6 +748,7 @@ int main(int argc, char *argv[])
int writec2=0,maxdrift;
int shift1, lagmin, lagmax, lagstep, ifmin, ifmax, not_decoded;
unsigned int nbits=81, stacksize=200000;
struct snode * stack=NULL;
unsigned int npoints, cycles, maxnp, metric;
float df=375.0/256.0/2;
float fsymbs[162];
@ -1334,7 +1335,7 @@ int main(int argc, char *argv[])
deinterleave(symbols);
t0 = clock();
if ( stackdecoder ) {
if ( stack ) {
not_decoded = jelinek(&metric, &cycles, decdata, symbols, nbits,
stacksize, stack, mettab,maxcycles);
} else {
@ -1566,9 +1567,7 @@ int main(int argc, char *argv[])
free(call_loc_pow);
free(idat);
free(qdat);
if( stackdecoder ) {
free(stack);
}
return 0;
}