mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05: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
8e56a3c2ef
commit
fc5d05394e
@ -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";
|
||||||
|
10
getfile.cpp
10
getfile.cpp
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +159,9 @@ int ptt(int nport, int ntx, int* iptt, int* nopen)
|
|||||||
*iptt=0;
|
*iptt=0;
|
||||||
*nopen=0;
|
*nopen=0;
|
||||||
}
|
}
|
||||||
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,29 +2338,31 @@ void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
|||||||
|
|
||||||
void MainWindow::acceptQSO2(bool accepted)
|
void MainWindow::acceptQSO2(bool accepted)
|
||||||
{
|
{
|
||||||
m_logQSOgeom=logDlg->geometry();
|
if(accepted) {
|
||||||
QString date=dateTimeQSO.toString("yyyyMMdd");
|
m_logQSOgeom=logDlg->geometry();
|
||||||
QFile f("wsjtx.log");
|
QString date=dateTimeQSO.toString("yyyyMMdd");
|
||||||
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
QFile f("wsjtx.log");
|
||||||
msgBox("Cannot open file \"wsjtx.log\".");
|
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
||||||
} else {
|
msgBox("Cannot open file \"wsjtx.log\".");
|
||||||
QString logEntry=dateTimeQSO.date().toString("yyyy-MMM-dd,") +
|
} else {
|
||||||
dateTimeQSO.time().toString("hh:mm,") + m_hisCall + "," +
|
QString logEntry=dateTimeQSO.date().toString("yyyy-MMM-dd,") +
|
||||||
m_hisGrid + "," + QString::number(m_dialFreq) + "," + m_mode +
|
dateTimeQSO.time().toString("hh:mm,") + m_hisCall + "," +
|
||||||
"," + m_rptSent + "," + m_rptRcvd;
|
m_hisGrid + "," + QString::number(m_dialFreq) + "," + m_mode +
|
||||||
QTextStream out(&f);
|
"," + m_rptSent + "," + m_rptRcvd;
|
||||||
out << logEntry << endl;
|
QTextStream out(&f);
|
||||||
f.close();
|
out << logEntry << endl;
|
||||||
}
|
f.close();
|
||||||
if(m_clearCallGrid) {
|
}
|
||||||
m_hisCall="";
|
if(m_clearCallGrid) {
|
||||||
ui->dxCallEntry->setText("");
|
m_hisCall="";
|
||||||
m_hisGrid="";
|
ui->dxCallEntry->setText("");
|
||||||
ui->dxGridEntry->setText("");
|
m_hisGrid="";
|
||||||
m_rptSent="";
|
ui->dxGridEntry->setText("");
|
||||||
m_rptRcvd="";
|
m_rptSent="";
|
||||||
m_qsoStart="";
|
m_rptRcvd="";
|
||||||
m_qsoStop="";
|
m_qsoStart="";
|
||||||
|
m_qsoStop="";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -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;
|
||||||
m_ntx=7;
|
if(!m_freeText) {
|
||||||
if(m_transmitting) m_restart=true;
|
m_ntx=7;
|
||||||
|
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;
|
||||||
m_ntx=8;
|
if(m_freeText) {
|
||||||
if(m_transmitting) m_restart=true;
|
m_ntx=8;
|
||||||
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,8 @@ 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