From 7895172d3f5277516d0c4376b658e190cbd232ad Mon Sep 17 00:00:00 2001
From: Joe Taylor <joe@princeton.edu>
Date: Tue, 17 Sep 2024 13:21:01 -0400
Subject: [PATCH] Code cleanup to satisfy warning messages.

---
 lib/superfox/sfox_pack.f90      | 3 +--
 lib/superfox/sfox_wave_gfsk.f90 | 2 +-
 lib/superfox/sftx_sub.f90       | 8 --------
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/lib/superfox/sfox_pack.f90 b/lib/superfox/sfox_pack.f90
index 19e6ed3fb..4ccd0e706 100644
--- a/lib/superfox/sfox_pack.f90
+++ b/lib/superfox/sfox_pack.f90
@@ -4,7 +4,6 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
   use packjt
   use packjt77
   use julian
-  integer stat
   integer*8 n47,n58,now
   integer*1 xin(0:49)                    !Packed message as 7-bit symbols
   logical*1 bMoreCQs,bSendMsg
@@ -89,7 +88,7 @@ subroutine sfox_pack(line,ckey,bMoreCQs,bSendMsg,freeTextMsg,xin)
 1002 format(b28.28)
      j=j+28
      nh1=nh1+1
-     if( nht.ge.5 ) exit                     !At most 5 RR73 callsigns
+     if(nh1.ge.5) exit                       !At most 5 RR73 callsigns
   enddo
   
 ! Process callsigns with a report
diff --git a/lib/superfox/sfox_wave_gfsk.f90 b/lib/superfox/sfox_wave_gfsk.f90
index 6844a3fdd..64433001d 100644
--- a/lib/superfox/sfox_wave_gfsk.f90
+++ b/lib/superfox/sfox_wave_gfsk.f90
@@ -12,7 +12,7 @@ subroutine sfox_wave_gfsk(fname)
   character*(*) fname
   character*40 cmsg2
   integer itone(151)
-  real*8 dt,twopi,f0,baud,phi,dphi_peak
+  real*8 dt,twopi,f0,phi,dphi_peak
   real*8 dphi(0:NPTS-1)
   real*8 pulse(3*NSPS)
   logical first/.true./
diff --git a/lib/superfox/sftx_sub.f90 b/lib/superfox/sftx_sub.f90
index 11fea043e..5903e0801 100644
--- a/lib/superfox/sftx_sub.f90
+++ b/lib/superfox/sftx_sub.f90
@@ -17,22 +17,14 @@ subroutine sftx_sub(fname,foxcall0,ckey0)
   character*120 line                  !List of SuperFox message pieces
   character*40 cmsg                   !Old-style Fox messages
   character*26 freeTextMsg
-  character*2 arg
   character*(*) ckey0
   character*10 ckey
   character*(*) foxcall0
   character*11 foxcall
   logical*1 bMoreCQs,bSendMsg
-  logical crc_ok
-  real py(0:127,0:127)                !Probabilities for received synbol values
-  integer*8 n47
   integer*1 xin(0:49)                 !Packed message as 7-bit symbols
-  integer*1 xdec(0:49)                !Decoded message
   integer*1 y(0:127)                  !Encoded symbols as i*1 integers
-  integer*1 ydec(0:127)               !Decoded codeword
-  integer*1 yy(0:10)
   integer chansym0(127)               !Transmitted symbols, data only
-  integer chansym(127)                !Received symbols, data only
   integer isync(24)                   !Symbol numbers for sync tones
   common/foxcom3/nslots,cmsg(5),itone(151)
   data isync/1,2,4,7,11,16,22,29,37,39,42,43,45,48,52,57,63,70,78,80,  &