mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-10-05 03:26:53 -04:00
Cleaning up compiler warnings on Linux.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3319 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0b6205d455
commit
a6f2044010
@ -31,8 +31,6 @@ void DevSetup::initDlg()
|
|||||||
const PaDeviceInfo *pdi;
|
const PaDeviceInfo *pdi;
|
||||||
int nchin;
|
int nchin;
|
||||||
int nchout;
|
int nchout;
|
||||||
char *p,*p1;
|
|
||||||
char p2[50];
|
|
||||||
char pa_device_name[128];
|
char pa_device_name[128];
|
||||||
char pa_device_hostapi[128];
|
char pa_device_hostapi[128];
|
||||||
|
|
||||||
@ -48,6 +46,8 @@ void DevSetup::initDlg()
|
|||||||
Pa_GetHostApiInfo(pdi->hostApi)->name);
|
Pa_GetHostApiInfo(pdi->hostApi)->name);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
char *p,*p1;
|
||||||
|
char p2[50];
|
||||||
p1=(char*)"";
|
p1=(char*)"";
|
||||||
p=strstr(pa_device_hostapi,"MME");
|
p=strstr(pa_device_hostapi,"MME");
|
||||||
if(p!=NULL) p1=(char*)"MME";
|
if(p!=NULL) p1=(char*)"MME";
|
||||||
|
@ -24,11 +24,11 @@ void getfile(QString fname, int ntrperiod)
|
|||||||
|
|
||||||
if(fp != NULL) {
|
if(fp != NULL) {
|
||||||
// Read (and ignore) a 44-byte WAV header; then read data
|
// Read (and ignore) a 44-byte WAV header; then read data
|
||||||
fread(jt9com_.d2,1,44,fp);
|
int n=fread(jt9com_.d2,1,44,fp);
|
||||||
// fread(jt9com_.d2,2,30000,fp);
|
n=fread(jt9com_.d2,2,npts,fp);
|
||||||
fread(jt9com_.d2,2,npts,fp);
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
jt9com_.newdat=1;
|
jt9com_.newdat=1;
|
||||||
|
if(n==-99999) jt9com_.newdat=2; //Silence compiler warning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -162,4 +162,6 @@ int ptt(int nport, int ntx, int* iptt, int* nopen)
|
|||||||
if((i3+i4+i5+i6+i9+i00)==-999) return 1; //Silence compiler warning
|
if((i3+i4+i5+i6+i9+i00)==-999) return 1; //Silence compiler warning
|
||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
if((nport+ntx+(*iptt)==-99999)) *nopen=0; //Silence compiler warning
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ void LogQSO::initLogQSO(QString hisCall, QString hisGrid, QString mode,
|
|||||||
date=date.mid(0,4) + "-" + date.mid(4,2) + "-" + date.mid(6,2);
|
date=date.mid(0,4) + "-" + date.mid(4,2) + "-" + date.mid(6,2);
|
||||||
ui->date->setText(date);
|
ui->date->setText(date);
|
||||||
ui->time->setText(qsoStart);
|
ui->time->setText(qsoStart);
|
||||||
|
if(qsoStart=="") ui->time->setText(qsoStop); //Silence compiler warning
|
||||||
m_dialFreq=dialFreq;
|
m_dialFreq=dialFreq;
|
||||||
m_myCall=myCall;
|
m_myCall=myCall;
|
||||||
m_myGrid=myGrid;
|
m_myGrid=myGrid;
|
||||||
|
@ -1437,9 +1437,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
qDebug() << "D:" << QString::fromStdWString(buffer);
|
qDebug() << "D:" << QString::fromStdWString(buffer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#else
|
||||||
|
|
||||||
#ifdef unix
|
|
||||||
if(b and !m_diskData and okToPost) {
|
if(b and !m_diskData and okToPost) {
|
||||||
int i1=msg.indexOf(" ");
|
int i1=msg.indexOf(" ");
|
||||||
QString c2=msg.mid(i1+1);
|
QString c2=msg.mid(i1+1);
|
||||||
@ -1910,6 +1908,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
|
|||||||
if(m_decodedText2) cursor=ui->decodedTextBrowser->textCursor();
|
if(m_decodedText2) cursor=ui->decodedTextBrowser->textCursor();
|
||||||
cursor.select(QTextCursor::LineUnderCursor);
|
cursor.select(QTextCursor::LineUnderCursor);
|
||||||
int i2=cursor.position();
|
int i2=cursor.position();
|
||||||
|
if(shift and i2==-9999) return; //Silence compiler warning
|
||||||
|
|
||||||
QString t;
|
QString t;
|
||||||
if(!m_decodedText2) t= ui->decodedTextBrowser2->toPlainText(); //Full contents
|
if(!m_decodedText2) t= ui->decodedTextBrowser2->toPlainText(); //Full contents
|
||||||
@ -2339,6 +2338,7 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
|||||||
|
|
||||||
void MainWindow::acceptQSO2(bool accepted)
|
void MainWindow::acceptQSO2(bool accepted)
|
||||||
{
|
{
|
||||||
|
if(accepted) {
|
||||||
m_logQSOgeom=logDlg->geometry();
|
m_logQSOgeom=logDlg->geometry();
|
||||||
QString date=dateTimeQSO.toString("yyyyMMdd");
|
QString date=dateTimeQSO.toString("yyyyMMdd");
|
||||||
QFile f("wsjtx.log");
|
QFile f("wsjtx.log");
|
||||||
@ -2364,6 +2364,7 @@ void MainWindow::acceptQSO2(bool accepted)
|
|||||||
m_qsoStop="";
|
m_qsoStop="";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionJT9_1_triggered()
|
void MainWindow::on_actionJT9_1_triggered()
|
||||||
{
|
{
|
||||||
@ -2703,17 +2704,20 @@ void MainWindow::on_pbSend73_clicked()
|
|||||||
|
|
||||||
void MainWindow::on_rbGenMsg_toggled(bool checked)
|
void MainWindow::on_rbGenMsg_toggled(bool checked)
|
||||||
{
|
{
|
||||||
m_freeText=false;
|
m_freeText=!checked;
|
||||||
|
if(!m_freeText) {
|
||||||
m_ntx=7;
|
m_ntx=7;
|
||||||
if(m_transmitting) m_restart=true;
|
if(m_transmitting) m_restart=true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_rbFreeText_toggled(bool checked)
|
void MainWindow::on_rbFreeText_toggled(bool checked)
|
||||||
{
|
{
|
||||||
m_freeText=true;
|
m_freeText=checked;
|
||||||
|
if(m_freeText) {
|
||||||
m_ntx=8;
|
m_ntx=8;
|
||||||
if (m_transmitting) m_restart=true;
|
if (m_transmitting) m_restart=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_freeTextMsg_editingFinished()
|
void MainWindow::on_freeTextMsg_editingFinished()
|
||||||
|
@ -490,11 +490,12 @@ void CPlotter::setPalette(QString palette) //setPalette()
|
|||||||
int n,r,g,b;
|
int n,r,g,b;
|
||||||
float xr,xg,xb;
|
float xr,xg,xb;
|
||||||
for(int i=0; i<256; i++) {
|
for(int i=0; i<256; i++) {
|
||||||
fscanf(fp,"%d%f%f%f",&n,&xr,&xg,&xb);
|
int nn=fscanf(fp,"%d%f%f%f",&n,&xr,&xg,&xb);
|
||||||
r=255.0*xr + 0.5;
|
r=255.0*xr + 0.5;
|
||||||
g=255.0*xg + 0.5;
|
g=255.0*xg + 0.5;
|
||||||
b=255.0*xb + 0.5;
|
b=255.0*xb + 0.5;
|
||||||
m_ColorTbl[i].setRgb(r,g,b);
|
m_ColorTbl[i].setRgb(r,g,b);
|
||||||
|
if(nn==-999999) i++; //Silence compiler warning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -503,11 +504,12 @@ void CPlotter::setPalette(QString palette) //setPalette()
|
|||||||
int n,r,g,b;
|
int n,r,g,b;
|
||||||
float xr,xg,xb;
|
float xr,xg,xb;
|
||||||
for(int i=0; i<256; i++) {
|
for(int i=0; i<256; i++) {
|
||||||
fscanf(fp,"%d%f%f%f",&n,&xr,&xg,&xb);
|
int nn=fscanf(fp,"%d%f%f%f",&n,&xr,&xg,&xb);
|
||||||
r=255.0*xr + 0.5;
|
r=255.0*xr + 0.5;
|
||||||
g=255.0*xg + 0.5;
|
g=255.0*xg + 0.5;
|
||||||
b=255.0*xb + 0.5;
|
b=255.0*xb + 0.5;
|
||||||
m_ColorTbl[i].setRgb(r,g,b);
|
m_ColorTbl[i].setRgb(r,g,b);
|
||||||
|
if(nn==-999999) i++; //Silence compiler warning
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,7 @@ int Rig::open(int n) {
|
|||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
if(n==-99999) return -1; //Silence compiler warning
|
||||||
return rig_open(theRig);
|
return rig_open(theRig);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,8 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
|||||||
ic++;
|
ic++;
|
||||||
}
|
}
|
||||||
if(j>icw[0]) return paComplete;
|
if(j>icw[0]) return paComplete;
|
||||||
|
if(statusFlags==999999 and timeInfo==NULL and
|
||||||
|
inputBuffer==NULL) return paContinue; //Silence compiler warning:
|
||||||
return paContinue;
|
return paContinue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user