Skip to content

Commit 6241d84

Browse files
committed
quieten compiler warnings
Misc type coercion issues. Many related to the change of the obs_t SNR from an int to a float that generate warnings with MSC. rtksvrostat: change the SNR output argument from int to double, and rework the callers. The obs_t SNR is now a float rather than an integer. str2time: The guard for the width was wrong. Change the start and width arguments to be size_t to help avoid compiler warnings.
1 parent 9117571 commit 6241d84

25 files changed

Lines changed: 163 additions & 148 deletions

app/qtapp/rtknavi_qt/navimain.cpp

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ MainWindow::MainWindow(QWidget *parent)
142142
satellitesAzimuth[i][j] = satellitesElevation[i][j] = 0.0;
143143
for (int k = 0; k < NFREQ; k++) {
144144
validSatellites[i][j][k] = 0;
145-
satellitesSNR[i][j][k] = 0;
145+
satellitesSNR[i][j][k] = 0.0;
146146
}
147147
}
148148

@@ -1664,7 +1664,8 @@ void MainWindow::drawSolutionPlot(QLabel *plot, int type, int freq)
16641664

16651665
int w = buffer.size().width() - 2;
16661666
int h = buffer.height() - 2;
1667-
int i, j, x, sat[2][MAXSAT], ns[2], snr[2][MAXSAT][NFREQ], vsat[2][MAXSAT][NFREQ];
1667+
int i, j, x, sat[2][MAXSAT], ns[2], vsat[2][MAXSAT][NFREQ];
1668+
double snr[2][MAXSAT][NFREQ];
16681669
int topMargin = QFontMetrics(optDialog->panelFont).height()*3/2;
16691670
double az[2][MAXSAT], el[2][MAXSAT], rr[3], pos[3];
16701671

@@ -1698,7 +1699,7 @@ void MainWindow::drawSolutionPlot(QLabel *plot, int type, int freq)
16981699
for (j = 0; j < numSatellites[i]; j++) {
16991700
for (int k = 0; k < NFREQ; k++) {
17001701
validSatellites[i][j][k] = 0;
1701-
satellitesSNR[i][j][k] = 0;
1702+
satellitesSNR[i][j][k] = 0.0;
17021703
}
17031704
}
17041705
}
@@ -1780,17 +1781,17 @@ void MainWindow::updatePlot()
17801781
}
17811782
}
17821783
// snr color ----------------------------------------------------------------
1783-
QColor MainWindow::snrColor(int snr)
1784+
QColor MainWindow::snrColor(double snr)
17841785
{
17851786
QColor color[] = {Qt::darkGreen, Color::Orange, Color::Fuchsia, Qt::blue, Qt::red, Qt::darkGray};
17861787
uint32_t r1, g1, b1;
17871788
QColor c1, c2;
17881789
double a;
17891790
int i;
17901791

1791-
if (snr < 25) return color[5];
1792-
if (snr < 27) return color[4];
1793-
if (snr > 47) return color[0];
1792+
if (snr < 25.0) return color[5];
1793+
if (snr < 27.0) return color[4];
1794+
if (snr > 47.0) return color[0];
17941795
a = (snr - 27.5) / 5.0;
17951796
i = static_cast<int>(a);
17961797
a -= i;
@@ -1812,7 +1813,8 @@ void MainWindow::drawSnr(QPainter &c, int w, int h, int x0, int y0,
18121813
QColor(128, 128, 128)
18131814
};
18141815
static const QColor color_sys[] = {Qt::darkGreen, Color::Orange, Color::Fuchsia, Qt::blue, Qt::red, Color::Teal, Qt::darkGray};
1815-
int i, j, snrIdx, sysIdx, numSystems, x1, y1, height, offset, topMargin, bottomMargin, hh, barDistance, barWidth, snr[NFREQ + 1], sysMask[7] = {0};
1816+
int i, j, snrIdx, sysIdx, numSystems, x1, y1, height, offset, topMargin, bottomMargin, hh, barDistance, barWidth, sysMask[7] = {0};
1817+
double snr[NFREQ + 1];
18161818
char id[8], sys[] = "GREJCS", *q;
18171819

18181820
trace(4, "drawSnr: w=%d h=%d x0=%d y0=%d index=%d freq=%d\n", w, h, x0, y0, index, freq);
@@ -1828,7 +1830,7 @@ void MainWindow::drawSnr(QPainter &c, int w, int h, int x0, int y0,
18281830
for (snr[0] = MINSNR + 10; snr[0] < MAXSNR; snr[0] += 10) {
18291831
y1 = y0 + hh - (snr[0] - MINSNR) * hh / (MAXSNR - MINSNR);
18301832
c.drawLine(x0 + 2, y1, x0 + w - 20, y1);
1831-
drawText(c, x0 + w - 4, y1, QLocale().toString(snr[0]), Qt::darkGray, 2, 0);
1833+
drawText(c, x0 + w - 4, y1, QString::number(qRound(snr[0])), Qt::darkGray, 2, 0);
18321834
}
18331835

18341836
// draw outer box
@@ -1846,15 +1848,16 @@ void MainWindow::drawSnr(QPainter &c, int w, int h, int x0, int y0,
18461848
satno2id(satellites[index][i], id);
18471849
sysIdx = (q = strchr(sys, id[0])) ? (int)(q - sys) : 6;
18481850

1849-
for (j = snr[0] = 0; j < NFREQ; j++) {
1851+
snr[0] = 0.0;
1852+
for (j = 0; j < NFREQ; j++) {
18501853
snr[j + 1] = satellitesSNR[index][i][j];
18511854
if ((freq && freq == j + 1) || ((!freq || freq > NFREQ) && snr[j + 1] > snr[0]))
18521855
snr[0] = snr[j + 1]; // store max snr
18531856
}
18541857
for (j = 0; j < NFREQ + 2; j++) {
18551858
snrIdx = j < NFREQ + 1 ? j : 0;
18561859
offset = j < NFREQ + 1 ? 0 : 2;
1857-
if (snr[snrIdx] > 0) height = (snr[snrIdx] - MINSNR) * hh / (MAXSNR - MINSNR);
1860+
if (snr[snrIdx] > 0) height = (int)round((snr[snrIdx] - MINSNR) * hh / (MAXSNR - MINSNR));
18581861
else height = offset;
18591862
height = height > y1 - 2 ? y1 - 2 : (height < 0 ? 0 : height); // limit bar from going negative or too high
18601863

@@ -1896,7 +1899,8 @@ void MainWindow::drawSatellites(QPainter &c, int w, int h, int x0, int y0,
18961899
QColor color_text;
18971900
QPoint p(w / 2, h / 2);
18981901
double r = qMin(w * 0.95, h * 0.95) / 2, azel[MAXSAT * 2], dop[4];
1899-
int i, j, k, sysIdx, radius, x[MAXSAT], y[MAXSAT], snr[NFREQ + 1], nsats = 0;
1902+
int i, j, k, sysIdx, radius, x[MAXSAT], y[MAXSAT], nsats = 0;
1903+
double snr[NFREQ + 1];
19001904
char id[8], sys[] = "GREJCIS", *q;
19011905

19021906
trace(4, "drawSatellites: w=%d h=%d index=%d freq=%d\n", w, h, index, freq);
@@ -1906,7 +1910,8 @@ void MainWindow::drawSatellites(QPainter &c, int w, int h, int x0, int y0,
19061910
// draw satellites
19071911
for (i = 0, k = numSatellites[index] - 1; i < numSatellites[index] && i < MAXSAT; i++, k--) {
19081912
if (satellitesElevation[index][k] <= 0.0) continue;
1909-
for (j = snr[0] = 0; j < NFREQ; j++) {
1913+
snr[0] = 0.0;
1914+
for (j = 0; j < NFREQ; j++) {
19101915
snr[j + 1] = satellitesSNR[index][k][j];
19111916
if ((freq && freq == j + 1) || ((!freq || freq > NFREQ) && snr[j + 1] > snr[0])) {
19121917
snr[0] = snr[j + 1]; // max snr
@@ -1915,7 +1920,7 @@ void MainWindow::drawSatellites(QPainter &c, int w, int h, int x0, int y0,
19151920
int anyValidSatFreq = 0;
19161921
for (int fi = 0; fi < NFREQ; fi++)
19171922
if (validSatellites[index][k][fi]) { anyValidSatFreq = 1; break; }
1918-
if (anyValidSatFreq && (freq > NFREQ || snr[freq] > 0)) {
1923+
if (anyValidSatFreq && (freq > NFREQ || snr[freq] > 0.0)) {
19191924
azel[nsats * 2] = satellitesAzimuth[index][k];
19201925
azel[nsats * 2 + 1] = satellitesElevation[index][k];
19211926
nsats++;
@@ -1930,7 +1935,7 @@ void MainWindow::drawSatellites(QPainter &c, int w, int h, int x0, int y0,
19301935
(freq < NFREQ + 1 ? snrColor(snr[freq]) : color_sys[sysIdx]));
19311936
c.setPen(Qt::darkGray);
19321937
color_text = Qt::white;
1933-
if (freq < NFREQ + 1 && snr[freq] <= 0) {
1938+
if (freq < NFREQ + 1 && snr[freq] <= 0.0) {
19341939
c.setPen(Color::Silver);
19351940
color_text = Color::Silver;
19361941
}

app/qtapp/rtknavi_qt/navimain.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public slots:
137137
void showFrequenciesDialog();
138138
void showMaskDialog();
139139
void showKeyDialog();
140-
QColor snrColor(int snr);
140+
QColor snrColor(double snr);
141141

142142
public:
143143
OptDialog *optDialog;
@@ -160,7 +160,8 @@ public slots:
160160
int monitorPortOpen;
161161

162162
int solutionsCurrent, solutionsStart, solutionsEnd, numSatellites[2], solutionCurrentStatus;
163-
int satellites[2][MAXSAT], satellitesSNR[2][MAXSAT][NFREQ], validSatellites[2][MAXSAT][NFREQ];
163+
int satellites[2][MAXSAT], validSatellites[2][MAXSAT][NFREQ];
164+
double satellitesSNR[2][MAXSAT][NFREQ];
164165
double satellitesAzimuth[2][MAXSAT], satellitesElevation[2][MAXSAT];
165166
gtime_t *timeStamps;
166167
int *solutionStatus, *numValidSatellites;

app/winapp/rtknavi/navimain.cpp

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ __fastcall TMainForm::TMainForm(TComponent* Owner)
141141
Sat[i][j]=0;
142142
Az[i][j]=El[i][j]=0.0;
143143
for (int k=0;k<NFREQ;k++) {
144-
Snr[i][j][k]=0;
144+
Snr[i][j][k]=0.0;
145145
Vsat[i][j][k]=0;
146146
}
147147
}
@@ -1669,7 +1669,8 @@ void __fastcall TMainForm::DrawPlot(TImage *plot, int type, int freq)
16691669
TCanvas *c=plot->Canvas;
16701670
TLabel *label[]={Plabel1,Plabel2,Plabel3,Pos1,Pos2,Pos3};
16711671
int w=plot->Parent->Width-2,h=plot->Parent->Height-2;
1672-
int i,j,x,sat[2][MAXSAT],ns[2],snr[2][MAXSAT][NFREQ],vsat[2][MAXSAT][NFREQ];
1672+
int i,j,x,sat[2][MAXSAT],ns[2],vsat[2][MAXSAT][NFREQ];
1673+
double snr[2][MAXSAT][NFREQ];
16731674
int tm=PanelFont->Size*3/2;
16741675
char name[16];
16751676
double az[2][MAXSAT],el[2][MAXSAT],rr[3],rs[6],e[3],pos[3],azel[2];
@@ -1802,16 +1803,16 @@ void __fastcall TMainForm::UpdatePlot(void)
18021803
}
18031804
}
18041805
// snr color ----------------------------------------------------------------
1805-
TColor __fastcall TMainForm::SnrColor(int snr)
1806+
TColor __fastcall TMainForm::SnrColor(double snr)
18061807
{
18071808
TColor color[]={clGreen,CLORANGE,clFuchsia,clBlue,clRed,clGray};
18081809
uint32_t c1,c2,r1,r2,g1,g2,b1,b2;
18091810
double a;
18101811
int i;
18111812

1812-
if (snr<25) return color[5];
1813-
if (snr<27) return color[4];
1814-
if (snr>47) return color[0];
1813+
if (snr<25.0) return color[5];
1814+
if (snr<27.0) return color[4];
1815+
if (snr>47.0) return color[0];
18151816
a=(snr-27.5)/5.0;
18161817
i=(int)a; a-=i;
18171818
c1=(uint32_t)color[3-i];
@@ -1837,7 +1838,8 @@ void __fastcall TMainForm::DrawSnr(TCanvas *c, int w, int h, int x0, int y0,
18371838
clGreen,(TColor)0xAAFF,clFuchsia,clBlue,clRed,clTeal,clGray
18381839
};
18391840
UTF8String s;
1840-
int i,j,k,l,n,x1,x2,y1,y2,y3,k1,tm,bm,hh,ww,www,snr[NFREQ+1],mask[7]={0};
1841+
int i,j,k,l,n,x1,x2,y1,y2,y3,k1,tm,bm,hh,ww,www,mask[7]={0};
1842+
double snr[NFREQ+1];
18411843
char id[8],sys[]="GREJCIS",*q;
18421844

18431845
trace(4,"DrawSnr: w=%d h=%d x0=%d y0=%d index=%d freq=%d\n",w,h,x0,y0,index,freq);
@@ -1850,7 +1852,7 @@ void __fastcall TMainForm::DrawSnr(TCanvas *c, int w, int h, int x0, int y0,
18501852
for (snr[0]=MINSNR+10;snr[0]<MAXSNR;snr[0]+=10) {
18511853
y1=y0+hh-(snr[0]-MINSNR)*hh/(MAXSNR-MINSNR);
18521854
c->MoveTo(x0+2,y1); c->LineTo(x0+w-2,y1);
1853-
DrawText(c,x0+w-4,y1,s.sprintf("%d",snr[0]),clGray,2,0);
1855+
DrawText(c,x0+w-4,y1,s.sprintf("%d",(int)round(snr[0])),clGray,2,0);
18541856
}
18551857
y1=y0+hh;
18561858
TRect b(x0+2,y0,x0+w-2,y1);
@@ -1865,8 +1867,9 @@ void __fastcall TMainForm::DrawSnr(TCanvas *c, int w, int h, int x0, int y0,
18651867
x1=x0+i*(w-16)/Nsat[index]+ww/2;
18661868
satno2id(Sat[index][i],id);
18671869
l=(q=strchr(sys,id[0]))?(int)(q-sys):6;
1868-
1869-
for (j=snr[0]=0;j<NFREQ;j++) {
1870+
1871+
snr[0]=0.0;
1872+
for (j=0;j<NFREQ;j++) {
18701873
snr[j+1]=Snr[index][i][j];
18711874
if ((freq&&freq==j+1)||((!freq||freq>NFREQ)&&snr[j+1]>snr[0])) {
18721875
snr[0]=snr[j+1];
@@ -1876,7 +1879,7 @@ void __fastcall TMainForm::DrawSnr(TCanvas *c, int w, int h, int x0, int y0,
18761879
k=j<NFREQ+1?j:0;
18771880
y3=j<NFREQ+1?0:2;
18781881
y2=y1-y3;
1879-
if (snr[k]>0) y2-=(snr[k]-MINSNR)*hh/(MAXSNR-MINSNR)-y3;
1882+
if (snr[k]>0) y2-=(int)round((snr[k]-MINSNR)*hh/(MAXSNR-MINSNR)-y3);
18801883
y2=y2<2?2:(y1<y2?y1:y2);
18811884

18821885
TRect r1(x1,y1,x1+www,y2);
@@ -1916,7 +1919,8 @@ void __fastcall TMainForm::DrawSat(TCanvas *c, int w, int h, int x0, int y0,
19161919
UTF8String s;
19171920
TPoint p(w/2,h/2);
19181921
double r=MIN(w*0.95,h*0.95)/2,azel[MAXSAT*2],dop[4];
1919-
int i,j,k,l,d,x[MAXSAT],y[MAXSAT],snr[NFREQ+1],ns=0;
1922+
int i,j,k,l,d,x[MAXSAT],y[MAXSAT],ns=0;
1923+
double snr[NFREQ+1];
19201924
char id[8],sys[]="GREJCIS",*q;
19211925

19221926
trace(4,"DrawSat: w=%d h=%d index=%d freq=%d\n",w,h,index,freq);
@@ -1925,7 +1929,8 @@ void __fastcall TMainForm::DrawSat(TCanvas *c, int w, int h, int x0, int y0,
19251929

19261930
for (i=0,k=Nsat[index]-1;i<Nsat[index]&&i<MAXSAT;i++,k--) {
19271931
if (El[index][k]<=0.0) continue;
1928-
for (j=snr[0]=0;j<NFREQ;j++) {
1932+
snr[0]=0;
1933+
for (j=0;j<NFREQ;j++) {
19291934
snr[j+1]=Snr[index][k][j];
19301935
if ((freq&&freq==j+1)||((!freq||freq>NFREQ)&&snr[j+1]>snr[0])) {
19311936
snr[0]=snr[j+1]; // max snr

app/winapp/rtknavi/navimain.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class TMainForm : public TForm
233233
void __fastcall SaveOpt (void);
234234
void __fastcall SetTrayIcon (int index);
235235
int __fastcall ExecCmd (AnsiString cmd, int show);
236-
TColor __fastcall SnrColor (int snr);
236+
TColor __fastcall SnrColor (double snr);
237237
public:
238238
AnsiString IniFile;
239239

@@ -254,7 +254,8 @@ class TMainForm : public TForm
254254
int MoniPort,OpenPort,AutoRun;
255255

256256
int PSol,PSolS,PSolE,Nsat[2],SolCurrentStat;
257-
int Sat[2][MAXSAT],Snr[2][MAXSAT][NFREQ],Vsat[2][MAXSAT][NFREQ];
257+
int Sat[2][MAXSAT],Vsat[2][MAXSAT][NFREQ];
258+
double Snr[2][MAXSAT][NFREQ];
258259
double Az[2][MAXSAT],El[2][MAXSAT];
259260
gtime_t *Time;
260261
int *SolStat,*Nvsat;

src/rcv/binex.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -987,16 +987,16 @@ static uint8_t *decode_bnx_7f_05_obs(raw_t *raw, uint8_t *buff, int sat,
987987
}
988988
if (k<0) {
989989
data->P[i]=data->L[i]=0.0;
990-
data->D[i]=data->SNR[i]=0.0;
990+
data->D[i]=data->SNR[i]=0.0f;
991991
data->LLI[i]=0;
992992
data->code[i]=CODE_NONE;
993993
}
994994
else {
995995
freq=code2freq(sys,codes[code[k]],fcn);
996996
data->P[i]=range[k];
997997
data->L[i]=phase[k]*freq/CLIGHT;
998-
data->D[i]=dopp[k];
999-
data->SNR[i]=cnr[k];
998+
data->D[i]=(float)dopp[k];
999+
data->SNR[i]=(float)cnr[k];
10001000
data->code[i]=codes[code[k]];
10011001
data->LLI[i]=slip[k]?1:0;
10021002
mask[k]=1;
@@ -1008,16 +1008,16 @@ static uint8_t *decode_bnx_7f_05_obs(raw_t *raw, uint8_t *buff, int sat,
10081008
}
10091009
if (k>=nobs) {
10101010
data->P[i]=data->L[i]=0.0;
1011-
data->D[i]=data->SNR[i]=0.0;
1011+
data->D[i]=data->SNR[i]=0.0f;
10121012
data->LLI[i]=0;
10131013
data->code[i]=CODE_NONE;
10141014
}
10151015
else {
10161016
freq=code2freq(sys,codes[code[k]],fcn);
10171017
data->P[i]=range[k];
10181018
data->L[i]=phase[k]*freq/CLIGHT;
1019-
data->D[i]=dopp[k];
1020-
data->SNR[i]=cnr[k];
1019+
data->D[i]=(float)dopp[k];
1020+
data->SNR[i]=(float)cnr[k];
10211021
data->code[i]=codes[code[k]];
10221022
data->LLI[i]=slip[k]?1:0;
10231023
mask[k]=1;

src/rcv/comnav.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ static int decode_rangeb(raw_t *raw)
387387
raw->obs.data[index].L [pos]=-adr;
388388
raw->obs.data[index].P [pos]=psr;
389389
raw->obs.data[index].D [pos]=(float)dop;
390-
raw->obs.data[index].SNR[pos]=0.0<=snr&&snr<255.0?snr:0;
390+
raw->obs.data[index].SNR[pos]=0.0<=snr&&snr<255.0?(float)snr:0.0f;
391391
raw->obs.data[index].LLI[pos]=(unsigned char)lli;
392392
raw->obs.data[index].code[pos]=code;
393393
#ifdef RTK_DISABLED

src/rcv/crescent.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ static int decode_cresraw(raw_t *raw)
145145
raw->obs.data[n].P[0]=pr;
146146
raw->obs.data[n].L[0]=cp*freq/CLIGHT;
147147
raw->obs.data[n].D[0]=-(float)(dop*freq/CLIGHT);
148-
raw->obs.data[n].SNR[0]=snr;
148+
raw->obs.data[n].SNR[0]=(float)snr;
149149
raw->obs.data[n].LLI[0]=(uint8_t)lli;
150150
raw->obs.data[n].code[0]=CODE_L1C;
151151

@@ -256,13 +256,13 @@ static int decode_cresraw2(raw_t *raw)
256256
raw->obs.data[n].P[j]=pr[j]==0.0?0.0:pr[j]-toff;
257257
raw->obs.data[n].L[j]=cp[j]==0.0?0.0:cp[j]-toff*freq[j]/CLIGHT;
258258
raw->obs.data[n].D[j]=-(float)dop[j];
259-
raw->obs.data[n].SNR[j]=snr[j];
259+
raw->obs.data[n].SNR[j]=(float)snr[j];
260260
raw->obs.data[n].LLI[j]=(uint8_t)lli[j];
261261
raw->obs.data[n].code[j]=j==0?CODE_L1C:CODE_L2P;
262262
}
263263
else {
264264
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
265-
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
265+
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
266266
raw->obs.data[n].LLI[j]=0;
267267
raw->obs.data[n].code[j]=CODE_NONE;
268268
}
@@ -461,13 +461,13 @@ static int decode_cresgloraw(raw_t *raw)
461461
raw->obs.data[n].P[j]=pr[j]==0.0?0.0:pr[j]-toff;
462462
raw->obs.data[n].L[j]=cp[j]==0.0?0.0:cp[j]-toff*freq[j]/CLIGHT;
463463
raw->obs.data[n].D[j]=-(float)dop[j];
464-
raw->obs.data[n].SNR[j]=snr[j];
464+
raw->obs.data[n].SNR[j]=(float)snr[j];
465465
raw->obs.data[n].LLI[j]=(uint8_t)lli[j];
466466
raw->obs.data[n].code[j]=j==0?CODE_L1C:CODE_L2P;
467467
}
468468
else {
469469
raw->obs.data[n].L[j]=raw->obs.data[n].P[j]=0.0;
470-
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0;
470+
raw->obs.data[n].D[j]=raw->obs.data[n].SNR[j]=0.0f;
471471
raw->obs.data[n].LLI[j]=0;
472472
raw->obs.data[n].code[j]=CODE_NONE;
473473
}

src/rcv/javad.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static int flushobuf(raw_t *raw)
232232
raw->obuf.data[i].time=time0;
233233
for (j=0;j<NFREQ+NEXOBS;j++) {
234234
raw->obuf.data[i].L[j]=raw->obuf.data[i].P[j]=0.0;
235-
raw->obuf.data[i].D[j]=raw->obuf.data[i].SNR[j]=0.0;
235+
raw->obuf.data[i].D[j]=raw->obuf.data[i].SNR[j]=0.0f;
236236
raw->obuf.data[i].LLI[j]=0;
237237
raw->obuf.data[i].code[j]=CODE_NONE;
238238
}
@@ -1581,7 +1581,7 @@ static int decode_Ex(raw_t *raw, char sig)
15811581

15821582
if ((idx=checkpri(sys,code,raw->opt,idx))>=0) {
15831583
if (!settag(raw->obuf.data+i,raw->time)) continue;
1584-
raw->obuf.data[i].SNR[idx]=cnr;
1584+
raw->obuf.data[i].SNR[idx]=(float)cnr;
15851585
}
15861586
}
15871587
return 0;
@@ -1612,7 +1612,7 @@ static int decode_xE(raw_t *raw, char sig)
16121612

16131613
if ((idx=checkpri(sys,code,raw->opt,idx))>=0) {
16141614
if (!settag(raw->obuf.data+i,raw->time)) continue;
1615-
raw->obuf.data[i].SNR[idx]=cnr*0.25;
1615+
raw->obuf.data[i].SNR[idx]=(float)(cnr*0.25);
16161616
}
16171617
}
16181618
return 0;

0 commit comments

Comments
 (0)