diff --git a/lib/ft4/ft4_downsample.f90 b/lib/ft4/ft4_downsample.f90 index bbe53a2a2..a6305c830 100644 --- a/lib/ft4/ft4_downsample.f90 +++ b/lib/ft4/ft4_downsample.f90 @@ -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. diff --git a/lib/ft8/filt8.f90 b/lib/ft8/filt8.f90 index abe797ba7..6b39c0434 100644 --- a/lib/ft8/filt8.f90 +++ b/lib/ft8/filt8.f90 @@ -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 diff --git a/lib/ft8/foxfilt.f90 b/lib/ft8/foxfilt.f90 index d97923a8f..6ad46a473 100644 --- a/lib/ft8/foxfilt.f90 +++ b/lib/ft8/foxfilt.f90 @@ -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 diff --git a/lib/wsprd/jelinek.h b/lib/wsprd/jelinek.h index 64ecdb963..82ce1deb4 100644 --- a/lib/wsprd/jelinek.h +++ b/lib/wsprd/jelinek.h @@ -10,8 +10,6 @@ struct snode { unsigned int jpointer; }; -struct snode *stack; - int jelinek(unsigned int *metric, unsigned int *cycles, unsigned char *data, diff --git a/lib/wsprd/nhash.c b/lib/wsprd/nhash.c index 9376954fa..e97a528d9 100644 --- a/lib/wsprd/nhash.c +++ b/lib/wsprd/nhash.c @@ -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; diff --git a/lib/wsprd/wsprd.c b/lib/wsprd/wsprd.c index b37ffe9c0..2e3b385da 100644 --- a/lib/wsprd/wsprd.c +++ b/lib/wsprd/wsprd.c @@ -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); - } + free(stack); return 0; }