From b9d33bc998b80d704ed442e0f6c505171e533310 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 7 Jan 2021 10:05:53 -0600 Subject: [PATCH] Address compiler warnings in fst4/w code. --- lib/fst4/encode240_101.f90 | 2 -- lib/fst4/encode240_74.f90 | 2 -- lib/fst4/fastosd240_74.f90 | 1 + lib/fst4/genfst4.f90 | 2 +- lib/fst4/get_fst4_bitmetrics.f90 | 5 +++-- lib/fst4/get_fst4_bitmetrics2.f90 | 1 - lib/fst4/ldpcsim240_74.f90 | 4 ++-- lib/fst4/osd240_101.f90 | 1 + lib/fst4/osd240_74.f90 | 1 + lib/fst4_decode.f90 | 3 ++- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/fst4/encode240_101.f90 b/lib/fst4/encode240_101.f90 index da0021df3..bd16b3ca9 100644 --- a/lib/fst4/encode240_101.f90 +++ b/lib/fst4/encode240_101.f90 @@ -4,12 +4,10 @@ subroutine encode240_101(message,codeword) use crc integer, parameter:: N=240, K=101, M=N-K - character*24 c24 integer*1 codeword(N) integer*1 gen(M,K) integer*1 message(K) integer*1 pchecks(M) - integer*4 ncrc24 include "ldpc_240_101_generator.f90" logical first data first/.true./ diff --git a/lib/fst4/encode240_74.f90 b/lib/fst4/encode240_74.f90 index 1d555d17f..459041407 100644 --- a/lib/fst4/encode240_74.f90 +++ b/lib/fst4/encode240_74.f90 @@ -4,12 +4,10 @@ subroutine encode240_74(message,codeword) use crc integer, parameter:: N=240, K=74, M=N-K - character*24 c24 integer*1 codeword(N) integer*1 gen(M,K) integer*1 message(K) integer*1 pchecks(M) - integer*4 ncrc24 include "ldpc_240_74_generator.f90" logical first data first/.true./ diff --git a/lib/fst4/fastosd240_74.f90 b/lib/fst4/fastosd240_74.f90 index f4bb61d60..aa14506a7 100644 --- a/lib/fst4/fastosd240_74.f90 +++ b/lib/fst4/fastosd240_74.f90 @@ -164,6 +164,7 @@ subroutine fastosd240_74(llr,k,apmask,ndeep,message74,cw,nhardmin,dmin) cw=c0 ntotal=0 nrejected=0 + xlambda=0.0 if(ndeep.eq.0) goto 998 ! norder=0 if(ndeep.gt.4) ndeep=4 diff --git a/lib/fst4/genfst4.f90 b/lib/fst4/genfst4.f90 index 650062a03..429505541 100644 --- a/lib/fst4/genfst4.f90 +++ b/lib/fst4/genfst4.f90 @@ -68,7 +68,7 @@ subroutine genfst4(msg0,ichk,msgsent,msgbits,i4tone,iwspr) if(ichk.eq.1) go to 999 if(unpk77_success) go to 2 -1 msgbits=0 + msgbits=0 itone=0 msgsent='*** bad message *** ' go to 999 diff --git a/lib/fst4/get_fst4_bitmetrics.f90 b/lib/fst4/get_fst4_bitmetrics.f90 index 9d3b0ba83..0ae747c5f 100644 --- a/lib/fst4/get_fst4_bitmetrics.f90 +++ b/lib/fst4/get_fst4_bitmetrics.f90 @@ -1,4 +1,4 @@ -subroutine get_fst4_bitmetrics(cd,nss,nmax,nhicoh,bitmetrics,s4,nsync_qual,badsync) +subroutine get_fst4_bitmetrics(cd,nss,bitmetrics,s4,nsync_qual,badsync) use timer_module, only: timer include 'fst4_params.f90' @@ -21,9 +21,10 @@ subroutine get_fst4_bitmetrics(cd,nss,nmax,nhicoh,bitmetrics,s4,nsync_qual,badsy data isyncword2/2,3,1,0,3,2,0,1/ data graymap/0,1,3,2/ data first/.true./,nss0/-1/ - save first,one,cp,nss0 + save first,one,nss0 if(nss.ne.nss0 .and. allocated(ci)) deallocate(ci) + if(first .or. nss.ne.nss0) then allocate(ci(nss,0:3)) one=.false. diff --git a/lib/fst4/get_fst4_bitmetrics2.f90 b/lib/fst4/get_fst4_bitmetrics2.f90 index 9badef231..96557d2ef 100644 --- a/lib/fst4/get_fst4_bitmetrics2.f90 +++ b/lib/fst4/get_fst4_bitmetrics2.f90 @@ -5,7 +5,6 @@ subroutine get_fst4_bitmetrics2(cd,nss,hmod,nsizes,bitmetrics,s4snr,badsync) complex csymb(nss) complex, allocatable, save :: c1(:,:) ! ideal waveforms, 4 tones complex cp(0:3) ! accumulated phase shift over symbol types 0:3 - complex csum,cterm integer isyncword1(0:7),isyncword2(0:7) integer graymap(0:3) integer ip(1) diff --git a/lib/fst4/ldpcsim240_74.f90 b/lib/fst4/ldpcsim240_74.f90 index 78e8e6b5f..de3ffa8b6 100644 --- a/lib/fst4/ldpcsim240_74.f90 +++ b/lib/fst4/ldpcsim240_74.f90 @@ -6,7 +6,7 @@ program ldpcsim240_74 parameter(N=240, K=74, M=N-K) character*8 arg - character*37 msg0,msg + character*37 msg0 character*77 c77 character*24 c24 integer*1 msgbits(74) @@ -15,7 +15,7 @@ program ldpcsim240_74 integer*1 codeword(N),message74(74) integer ncrc24 real rxdata(N),llr(N) - logical first,unpk77_success + logical first data first/.true./ nargs=iargc() diff --git a/lib/fst4/osd240_101.f90 b/lib/fst4/osd240_101.f90 index 5e9f5d195..9d97e8b61 100644 --- a/lib/fst4/osd240_101.f90 +++ b/lib/fst4/osd240_101.f90 @@ -128,6 +128,7 @@ subroutine osd240_101(llr,k,apmask,ndeep,message101,cw,nhardmin,dmin) nrejected=0 npre1=0 npre2=0 + nt=0 if(ndeep.eq.0) goto 998 ! norder=0 if(ndeep.gt.6) ndeep=6 diff --git a/lib/fst4/osd240_74.f90 b/lib/fst4/osd240_74.f90 index a44b69867..a54e767bb 100644 --- a/lib/fst4/osd240_74.f90 +++ b/lib/fst4/osd240_74.f90 @@ -128,6 +128,7 @@ subroutine osd240_74(llr,k,apmask,ndeep,message74,cw,nhardmin,dmin) nrejected=0 npre1=0 npre2=0 + nt=0 if(ndeep.eq.0) goto 998 ! norder=0 if(ndeep.gt.6) ndeep=6 diff --git a/lib/fst4_decode.f90 b/lib/fst4_decode.f90 index 5fb591ffa..b58b270e7 100644 --- a/lib/fst4_decode.f90 +++ b/lib/fst4_decode.f90 @@ -89,6 +89,7 @@ contains mycall13=mycall if(iwspr.ne.0.and.iwspr.ne.1) return + if(lagain) continue ! use lagain to keep compiler happy if(first) then ! read the fst4_calls.txt file @@ -401,7 +402,7 @@ contains cframe=c2(is0:iend) bitmetrics=0 call timer('bitmetrc',0) - call get_fst4_bitmetrics(cframe,nss,nblock,nhicoh,bitmetrics, & + call get_fst4_bitmetrics(cframe,nss,bitmetrics, & s4,nsync_qual,badsync) call timer('bitmetrc',1) if(badsync) cycle