mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-12-23 19:25:37 -05:00
Squash some compiler warnings
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6145 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
19779fa002
commit
5e2fec1fe4
@ -394,10 +394,15 @@ set (wsjt_FSRCS
|
||||
lib/zplot9.f90
|
||||
)
|
||||
|
||||
set (wsjt_CSRCS
|
||||
set (ka9q_CSRCS
|
||||
lib/sfrsd2/decode_rs.c
|
||||
lib/sfrsd2/encode_rs.c
|
||||
lib/sfrsd2/init_rs.c
|
||||
)
|
||||
set_source_files_properties (${ka9q_CSRCS} PROPERTIES COMPILE_FLAGS -Wno-sign-compare)
|
||||
|
||||
set (wsjt_CSRCS
|
||||
${ka9q_CSRCS}
|
||||
lib/sfrsd2/sfrsd2.c
|
||||
lib/gran.c
|
||||
lib/igray.c
|
||||
|
@ -2155,7 +2155,7 @@ Right click for insert and delete options.</string>
|
||||
<string>Aggressive decoding level:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QWidget" name="layoutWidget2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
@ -2243,7 +2243,7 @@ Right click for insert and delete options.</string>
|
||||
<property name="title">
|
||||
<string>Experience-based decoding</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QWidget" name="layoutWidget3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
|
@ -38,6 +38,8 @@ subroutine decjt9(ss,id2,nutc,nfqso,newdat,npts8,nfa,nfsplit,nfb,ntol, &
|
||||
df8=1500.0/nsps8
|
||||
dblim=db(864.0/nsps8) - 26.2
|
||||
|
||||
ia1=1 !quel compiler gripe
|
||||
ib1=1 !quel compiler gripe
|
||||
do nqd=1,0,-1
|
||||
limit=5000
|
||||
ccflim=3.0
|
||||
|
@ -6,7 +6,7 @@ subroutine rectify_msk(c,msg,freq2)
|
||||
complex c1(0:NSPM-1) !Rectified signal
|
||||
complex c2(0:NSPM-1) !Integral of rectified signal
|
||||
complex c3(0:2*NSPM-1) !FFT of rectified signal
|
||||
complex cfac,z
|
||||
complex cfac !,z
|
||||
character*22 msg,msgsent
|
||||
integer i4tone(234)
|
||||
|
||||
|
@ -30,74 +30,74 @@ void sfrsd2_(int mrsym[], int mrprob[], int mr2sym[], int mr2prob[],
|
||||
int rxdat[63], rxprob[63], rxdat2[63], rxprob2[63];
|
||||
int workdat[63];
|
||||
int era_pos[51];
|
||||
int i, j, numera, nerr, nn=63, kk=12;
|
||||
FILE *datfile, *logfile;
|
||||
int i, j, numera, nerr, nn=63;
|
||||
FILE *logfile = NULL;
|
||||
int ntrials = *ntrials0;
|
||||
int verbose = *verbose0;
|
||||
int nhard=0,nhard_min=32768,nsoft=0,nsoft_min=32768;
|
||||
int nsofter=0,nsofter_min=32768,ntotal=0,ntotal_min=32768,ncandidates;
|
||||
int nera_best;
|
||||
int nera_best=0;
|
||||
clock_t t0=0,t1=0;
|
||||
static unsigned int nseed;
|
||||
|
||||
/* For JT exp(x) symbol metrics - gaussian noise, no fading
|
||||
int perr[8][8] = {
|
||||
12, 31, 44, 52, 60, 57, 50, 50,
|
||||
28, 38, 49, 58, 65, 69, 64, 80,
|
||||
40, 41, 53, 62, 66, 73, 76, 81,
|
||||
50, 53, 53, 64, 70, 76, 77, 81,
|
||||
50, 50, 52, 60, 71, 72, 77, 84,
|
||||
50, 50, 56, 62, 67, 73, 81, 85,
|
||||
50, 50, 71, 62, 70, 77, 80, 85,
|
||||
50, 50, 62, 64, 71, 75, 82, 87};
|
||||
{12, 31, 44, 52, 60, 57, 50, 50},
|
||||
{28, 38, 49, 58, 65, 69, 64, 80},
|
||||
{40, 41, 53, 62, 66, 73, 76, 81},
|
||||
{50, 53, 53, 64, 70, 76, 77, 81},
|
||||
{50, 50, 52, 60, 71, 72, 77, 84},
|
||||
{50, 50, 56, 62, 67, 73, 81, 85},
|
||||
{50, 50, 71, 62, 70, 77, 80, 85},
|
||||
{50, 50, 62, 64, 71, 75, 82, 87}};
|
||||
*/
|
||||
|
||||
/* For JT exp(x) symbol metrics - hf conditions
|
||||
int perr[8][8] = {
|
||||
10, 10, 10, 12, 13, 15, 15, 9,
|
||||
28, 30, 43, 50, 61, 58, 50, 34,
|
||||
40, 40, 50, 53, 70, 65, 58, 45,
|
||||
50, 50, 53, 74, 71, 68, 66, 52,
|
||||
50, 50, 52, 45, 67, 70, 70, 60,
|
||||
50, 50, 56, 73, 55, 74, 69, 67,
|
||||
50, 50, 70, 81, 81, 69, 76, 75,
|
||||
50, 50, 62, 57, 77, 81, 73, 78};
|
||||
{10, 10, 10, 12, 13, 15, 15, 9},
|
||||
{28, 30, 43, 50, 61, 58, 50, 34},
|
||||
{40, 40, 50, 53, 70, 65, 58, 45},
|
||||
{50, 50, 53, 74, 71, 68, 66, 52},
|
||||
{50, 50, 52, 45, 67, 70, 70, 60},
|
||||
{50, 50, 56, 73, 55, 74, 69, 67},
|
||||
{50, 50, 70, 81, 81, 69, 76, 75},
|
||||
{50, 50, 62, 57, 77, 81, 73, 78}};
|
||||
*/
|
||||
|
||||
// For SF power-percentage symbol metrics - composite gnnf/hf
|
||||
int perr[8][8] = {
|
||||
4, 9, 11, 13, 14, 14, 15, 15,
|
||||
2, 20, 20, 30, 40, 50, 50, 50,
|
||||
7, 24, 27, 40, 50, 50, 50, 50,
|
||||
13, 25, 35, 46, 52, 70, 50, 50,
|
||||
17, 30, 42, 54, 55, 64, 71, 70,
|
||||
25, 39, 48, 57, 64, 66, 77, 77,
|
||||
32, 45, 54, 63, 66, 75, 78, 83,
|
||||
51, 58, 57, 66, 72, 77, 82, 86};
|
||||
{4, 9, 11, 13, 14, 14, 15, 15},
|
||||
{2, 20, 20, 30, 40, 50, 50, 50},
|
||||
{7, 24, 27, 40, 50, 50, 50, 50},
|
||||
{13, 25, 35, 46, 52, 70, 50, 50},
|
||||
{17, 30, 42, 54, 55, 64, 71, 70},
|
||||
{25, 39, 48, 57, 64, 66, 77, 77},
|
||||
{32, 45, 54, 63, 66, 75, 78, 83},
|
||||
{51, 58, 57, 66, 72, 77, 82, 86}};
|
||||
//
|
||||
|
||||
/* For SF power-percentage symbol metrics - gaussian noise, no fading
|
||||
int perr[8][8] = {
|
||||
1, 10, 10, 20, 30, 50, 50, 50,
|
||||
2, 20, 20, 30, 40, 50, 50, 50,
|
||||
7, 24, 27, 40, 50, 50, 50, 50,
|
||||
13, 25, 35, 46, 52, 70, 50, 50,
|
||||
17, 30, 42, 54, 55, 64, 71, 70,
|
||||
25, 39, 48, 57, 64, 66, 77, 77,
|
||||
32, 45, 54, 63, 66, 75, 78, 83,
|
||||
51, 58, 57, 66, 72, 77, 82, 86};
|
||||
{1, 10, 10, 20, 30, 50, 50, 50},
|
||||
{2, 20, 20, 30, 40, 50, 50, 50},
|
||||
{7, 24, 27, 40, 50, 50, 50, 50},
|
||||
{13, 25, 35, 46, 52, 70, 50, 50},
|
||||
{17, 30, 42, 54, 55, 64, 71, 70},
|
||||
{25, 39, 48, 57, 64, 66, 77, 77},
|
||||
{32, 45, 54, 63, 66, 75, 78, 83},
|
||||
{51, 58, 57, 66, 72, 77, 82, 86}};
|
||||
*/
|
||||
|
||||
/* For SF power-percentage symbol metrics - hf
|
||||
int perr[8][8] = {
|
||||
4, 9, 11, 13, 14, 14, 15, 15,
|
||||
9, 12, 14, 25, 28, 30, 50, 50,
|
||||
18, 22, 22, 28, 32, 35, 50, 50,
|
||||
30, 35, 38, 38, 57, 50, 50, 50,
|
||||
43, 46, 45, 53, 50, 64, 70, 50,
|
||||
56, 58, 58, 57, 67, 66, 80, 77,
|
||||
65, 72, 73, 72, 67, 75, 80, 83,
|
||||
70, 74, 73, 70, 75, 77, 80, 86};
|
||||
{4, 9, 11, 13, 14, 14, 15, 15},
|
||||
{9, 12, 14, 25, 28, 30, 50, 50},
|
||||
{18, 22, 22, 28, 32, 35, 50, 50},
|
||||
{30, 35, 38, 38, 57, 50, 50, 50},
|
||||
{43, 46, 45, 53, 50, 64, 70, 50},
|
||||
{56, 58, 58, 57, 67, 66, 80, 77},
|
||||
{65, 72, 73, 72, 67, 75, 80, 83},
|
||||
{70, 74, 73, 70, 75, 77, 80, 86}};
|
||||
*/
|
||||
|
||||
if(verbose) {
|
||||
@ -146,7 +146,7 @@ void sfrsd2_(int mrsym[], int mrprob[], int mr2sym[], int mr2prob[],
|
||||
memcpy(workdat,rxdat,sizeof(rxdat));
|
||||
nerr=decode_rs_int(rs,workdat,era_pos,numera,1);
|
||||
if( nerr >= 0 ) {
|
||||
if(verbose) {
|
||||
if(logfile) {
|
||||
fprintf(logfile,"BM decode nerrors= %3d : \n",nerr);
|
||||
fclose(logfile);
|
||||
}
|
||||
@ -169,7 +169,7 @@ used to decide which codeword is "best".
|
||||
|
||||
nseed=1; //Seed for random numbers
|
||||
|
||||
float ratio, ratio0[63];
|
||||
float ratio;
|
||||
int thresh, nsum;
|
||||
int thresh0[63];
|
||||
ncandidates=0;
|
||||
@ -179,7 +179,6 @@ used to decide which codeword is "best".
|
||||
nsum=nsum+rxprob[i];
|
||||
j = indexes[62-i];
|
||||
ratio = (float)rxprob2[j]/((float)rxprob[j]+0.01);
|
||||
ratio0[i]=ratio;
|
||||
ii = 7.999*ratio;
|
||||
jj = (62-i)/8;
|
||||
thresh0[i] = 1.3*perr[ii][jj];
|
||||
@ -254,7 +253,7 @@ NB: j is the symbol-vector index of the symbol with rank i.
|
||||
nhard_min=-1;
|
||||
}
|
||||
|
||||
if(verbose) {
|
||||
if(logfile) {
|
||||
fprintf(logfile,"ncand %4d nhard %4d nsoft %4d nhard+nsoft %4d nsum %8d\n",
|
||||
ncandidates,nhard_min,nsoft_min,ntotal_min,nsum);
|
||||
fclose(logfile);
|
||||
|
@ -71,6 +71,7 @@ subroutine syncmsk(cdat,npts,jpk,ipk,idf,rmax,snr,metric,decoded)
|
||||
dt=1.0/12000.0
|
||||
f0=1000.0
|
||||
f1=2000.0
|
||||
dphi=0 !quel compiler gripe
|
||||
do i=1,11
|
||||
if(b11(i).eq.0) dphi=twopi*f0*dt
|
||||
if(b11(i).eq.1) dphi=twopi*f1*dt
|
||||
|
@ -46,12 +46,13 @@ int enc213(unsigned char symbols[], unsigned char data[],
|
||||
unsigned int nbytes, unsigned int startstate,
|
||||
unsigned int endstate)
|
||||
{
|
||||
int i,j,k,n=-1;
|
||||
unsigned int i,j,k;
|
||||
int l,n=-1;
|
||||
unsigned int encstate = startstate;
|
||||
|
||||
for(k=0; k<nbytes; k++) {
|
||||
for(i=7;i>=0;i--){
|
||||
encstate = (encstate + encstate) + ((data[k] >> i) & 1);
|
||||
for(l=7;l>=0;l--){
|
||||
encstate = (encstate + encstate) + ((data[k] >> l) & 1);
|
||||
for(j=0;j<N;j++) {
|
||||
n=n+1;
|
||||
symbols[n] = parity(encstate & Polys[j]);
|
||||
@ -157,7 +158,7 @@ unsigned int endstate /* Encoder ending state */
|
||||
pp++;
|
||||
ipp++;
|
||||
}
|
||||
if(++bitcnt == nbits){
|
||||
if(++bitcnt == (int)nbits){
|
||||
*metric = nmetric[endstate];
|
||||
break;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
********************************************************************************/
|
||||
//float symbol_scale[4]={42.6, 53.3, 72.7, 100.2};
|
||||
float metric_tables[4][256]={
|
||||
0.9782, 0.9695, 0.9689, 0.9669, 0.9666, 0.9653, 0.9638, 0.9618, 0.9599, 0.9601,
|
||||
{0.9782, 0.9695, 0.9689, 0.9669, 0.9666, 0.9653, 0.9638, 0.9618, 0.9599, 0.9601,
|
||||
0.9592, 0.9570, 0.9556, 0.9540, 0.9525, 0.9527, 0.9486, 0.9477, 0.9450, 0.9436,
|
||||
0.9424, 0.9400, 0.9381, 0.9360, 0.9340, 0.9316, 0.9301, 0.9272, 0.9254, 0.9224,
|
||||
0.9196, 0.9171, 0.9154, 0.9123, 0.9076, 0.9061, 0.9030, 0.9000, 0.8965, 0.8934,
|
||||
@ -30,8 +30,8 @@ float metric_tables[4][256]={
|
||||
-3.0103, -3.0832, -3.1340, -3.1628, -3.2049, -3.2557, -3.3101, -3.3453, -3.4025, -3.4317,
|
||||
-3.4828, -3.5270, -3.5745, -3.6181, -3.6765, -3.7044, -3.7410, -3.8118, -3.8368, -3.9549,
|
||||
-3.9488, -3.9941, -4.0428, -4.0892, -4.1648, -4.1965, -4.1892, -4.2565, -4.3356, -4.3948,
|
||||
-4.4481, -4.4607, -4.5533, -4.5809, -4.5927, -5.1047,
|
||||
0.9978, 0.9962, 0.9961, 0.9959, 0.9958, 0.9954, 0.9949, 0.9950, 0.9947, 0.9942,
|
||||
-4.4481, -4.4607, -4.5533, -4.5809, -4.5927, -5.1047},
|
||||
{0.9978, 0.9962, 0.9961, 0.9959, 0.9958, 0.9954, 0.9949, 0.9950, 0.9947, 0.9942,
|
||||
0.9940, 0.9939, 0.9933, 0.9931, 0.9928, 0.9924, 0.9921, 0.9916, 0.9911, 0.9909,
|
||||
0.9903, 0.9900, 0.9892, 0.9887, 0.9883, 0.9877, 0.9869, 0.9863, 0.9857, 0.9848,
|
||||
0.9842, 0.9835, 0.9825, 0.9817, 0.9808, 0.9799, 0.9791, 0.9777, 0.9767, 0.9757,
|
||||
@ -56,8 +56,8 @@ float metric_tables[4][256]={
|
||||
-5.2378, -5.3094, -5.3742, -5.4573, -5.5190, -5.5728, -5.6637, -5.7259, -5.7843, -5.8854,
|
||||
-5.9553, -6.0054, -6.0656, -6.1707, -6.2241, -6.3139, -6.3393, -6.4356, -6.5153, -6.5758,
|
||||
-6.6506, -6.7193, -6.7542, -6.8942, -6.9219, -6.9605, -7.1013, -7.1895, -7.1549, -7.2799,
|
||||
-7.4119, -7.4608, -7.5256, -7.5879, -7.7598, -8.4120,
|
||||
0.9999, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997,
|
||||
-7.4119, -7.4608, -7.5256, -7.5879, -7.7598, -8.4120},
|
||||
{0.9999, 0.9998, 0.9998, 0.9998, 0.9998, 0.9998, 0.9997, 0.9997, 0.9997, 0.9997,
|
||||
0.9997, 0.9996, 0.9996, 0.9996, 0.9995, 0.9995, 0.9994, 0.9994, 0.9994, 0.9993,
|
||||
0.9993, 0.9992, 0.9991, 0.9991, 0.9990, 0.9989, 0.9988, 0.9988, 0.9988, 0.9986,
|
||||
0.9985, 0.9984, 0.9983, 0.9982, 0.9980, 0.9979, 0.9977, 0.9976, 0.9974, 0.9971,
|
||||
@ -82,8 +82,8 @@ float metric_tables[4][256]={
|
||||
-8.5287, -8.6347, -8.7082, -8.8319, -8.9448, -9.0355, -9.1885, -9.2095, -9.2863, -9.4186,
|
||||
-9.5064, -9.6386, -9.7207, -9.8286, -9.9453, -10.0701, -10.1735, -10.3001, -10.2858, -10.5427,
|
||||
-10.5982, -10.7361, -10.7042, -10.9212, -11.0097, -11.0469, -11.1155, -11.2812, -11.3472, -11.4988,
|
||||
-11.5327, -11.6692, -11.9376, -11.8606, -12.1372, -13.2539,
|
||||
1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
|
||||
-11.5327, -11.6692, -11.9376, -11.8606, -12.1372, -13.2539},
|
||||
{1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
|
||||
1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
|
||||
1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000, 1.0000,
|
||||
0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999, 0.9999,
|
||||
@ -108,4 +108,4 @@ float metric_tables[4][256]={
|
||||
-13.3265, -13.1667, -13.4274, -13.6064, -13.5515, -13.9501, -13.9926, -14.4049, -14.1653, -14.4348,
|
||||
-14.7983, -14.7807, -15.2349, -15.3536, -15.3026, -15.2739, -15.7170, -16.2161, -15.9185, -15.9490,
|
||||
-16.6258, -16.5568, -16.4318, -16.7999, -16.4101, -17.6393, -17.7643, -17.2644, -17.5973, -17.0403,
|
||||
-17.7039, -18.0073, -18.1840, -18.3848, -18.6286, -20.7063};
|
||||
-17.7039, -18.0073, -18.1840, -18.3848, -18.6286, -20.7063}};
|
||||
|
@ -100,7 +100,7 @@ unsigned long readc2file(char *ptr_to_infile, double *idat, double *qdat,
|
||||
//***************************************************************************
|
||||
unsigned long readwavfile(char *ptr_to_infile, int ntrmin, double *idat, double *qdat )
|
||||
{
|
||||
unsigned long i, j, npoints;
|
||||
int i, j, npoints;
|
||||
int nfft1, nfft2, nh2, i0;
|
||||
double df;
|
||||
|
||||
|
@ -46,7 +46,7 @@ long unsigned int pack_call(char *callsign) {
|
||||
char call6[6];
|
||||
memset(call6,32,sizeof(char)*6);
|
||||
// callsign is 6 characters in length. Exactly.
|
||||
int call_len = strlen(callsign);
|
||||
size_t call_len = strlen(callsign);
|
||||
if( call_len > 6 ) {
|
||||
return 0;
|
||||
}
|
||||
@ -80,11 +80,11 @@ long unsigned int pack_call(char *callsign) {
|
||||
}
|
||||
|
||||
void pack_prefix(char *callsign, int32_t *n, int32_t *m, int32_t *nadd ) {
|
||||
int i;
|
||||
size_t i;
|
||||
char *call6;
|
||||
call6=malloc(sizeof(char)*6);
|
||||
memset(call6,32,sizeof(char)*6);
|
||||
int i1=strcspn(callsign,"/");
|
||||
size_t i1=strcspn(callsign,"/");
|
||||
|
||||
if( callsign[i1+2] == 0 ) {
|
||||
//single char suffix
|
||||
@ -115,7 +115,7 @@ void pack_prefix(char *callsign, int32_t *n, int32_t *m, int32_t *nadd ) {
|
||||
char* pfx=strtok(callsign,"/");
|
||||
call6=strtok(NULL," ");
|
||||
*n=pack_call(call6);
|
||||
int plen=strlen(pfx);
|
||||
size_t plen=strlen(pfx);
|
||||
if( plen ==1 ) {
|
||||
*m=36;
|
||||
*m=37*(*m)+36;
|
||||
@ -187,11 +187,11 @@ int get_wspr_channel_symbols(char* rawmessage, char* hashtab, unsigned char* sym
|
||||
i++;
|
||||
}
|
||||
|
||||
int i1=strcspn(message," ");
|
||||
int i2=strcspn(message,"/");
|
||||
int i3=strcspn(message,"<");
|
||||
int i4=strcspn(message,">");
|
||||
int mlen=strlen(message);
|
||||
size_t i1=strcspn(message," ");
|
||||
size_t i2=strcspn(message,"/");
|
||||
size_t i3=strcspn(message,"<");
|
||||
size_t i4=strcspn(message,">");
|
||||
size_t mlen=strlen(message);
|
||||
|
||||
// Use the presence and/or absence of "<" and "/" to decide what
|
||||
// type of message. No sanity checks! Beware!
|
||||
|
Loading…
Reference in New Issue
Block a user