mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-20 10:54:14 +01:00
GCS: Quiet down some compiler warnings.
There are now 0 build issues in Linux when I use "QMAKE_CXXFLAGS+=-Wno-ignored-qualifiers -Wno-unused-parameter -Wno-unused-variable" (including the "") as additional arguments to qmake in Qt Creator. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1232 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
ea309623a6
commit
14a93b4e61
@ -49,7 +49,7 @@
|
||||
#include "MatVec.h"
|
||||
#ifdef _WIN32
|
||||
#include <float.h>
|
||||
#define isnan _isnan
|
||||
//#define isnan _isnan
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
@ -41,14 +41,14 @@ static char lib3ds_chunk_level[128]="";
|
||||
|
||||
|
||||
static void
|
||||
lib3ds_chunk_debug_enter(Lib3dsChunk *c)
|
||||
lib3ds_chunk_debug_enter(Lib3dsChunk *c __attribute__((unused)))
|
||||
{
|
||||
strcat(lib3ds_chunk_level, " ");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
lib3ds_chunk_debug_leave(Lib3dsChunk *c)
|
||||
lib3ds_chunk_debug_leave(Lib3dsChunk *c __attribute__((unused)))
|
||||
{
|
||||
lib3ds_chunk_level[strlen(lib3ds_chunk_level)-2]=0;
|
||||
}
|
||||
@ -159,7 +159,7 @@ lib3ds_chunk_read_next(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
* \ingroup chunk
|
||||
*/
|
||||
void
|
||||
lib3ds_chunk_read_reset(Lib3dsChunk *c, Lib3dsIo *io)
|
||||
lib3ds_chunk_read_reset(Lib3dsChunk *c __attribute__((unused)), Lib3dsIo *io)
|
||||
{
|
||||
lib3ds_io_seek(io, -6, LIB3DS_SEEK_CUR);
|
||||
}
|
||||
|
@ -485,7 +485,7 @@ lib3ds_node_dump(Lib3dsNode *node, Lib3dsIntd level)
|
||||
* \ingroup node
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_node_read(Lib3dsNode *node, Lib3dsFile *file, Lib3dsIo *io)
|
||||
lib3ds_node_read(Lib3dsNode *node, Lib3dsFile *file __attribute__((unused)), Lib3dsIo *io)
|
||||
{
|
||||
Lib3dsChunk c;
|
||||
Lib3dsWord chunk;
|
||||
|
@ -1407,7 +1407,7 @@ lib3ds_morph_track_read(Lib3dsMorphTrack *track, Lib3dsIo *io)
|
||||
* \ingroup tracks
|
||||
*/
|
||||
Lib3dsBool
|
||||
lib3ds_morph_track_write(Lib3dsMorphTrack *track, Lib3dsIo *io)
|
||||
lib3ds_morph_track_write(Lib3dsMorphTrack *track __attribute__((unused)), Lib3dsIo *io __attribute__((unused)))
|
||||
{
|
||||
/* FIXME: */
|
||||
ASSERT(0);
|
||||
|
@ -132,9 +132,6 @@ void ConnectionManager::onConnectPressed()
|
||||
//or if we are disconnecting it
|
||||
if(!m_ioDev)
|
||||
{
|
||||
m_connectBtn->setText("Disconnect");
|
||||
m_availableDevList->setEnabled(false);
|
||||
|
||||
m_connectionDevice = findDevice(m_availableDevList->currentText());
|
||||
|
||||
if(m_connectionDevice.connection)
|
||||
@ -146,6 +143,8 @@ void ConnectionManager::onConnectPressed()
|
||||
m_ioDev->open(QIODevice::ReadWrite);
|
||||
//signal interested plugins that the user wants to connect to the device
|
||||
emit deviceConnected(m_ioDev);
|
||||
m_connectBtn->setText("Disconnect");
|
||||
m_availableDevList->setEnabled(false);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@ -155,35 +154,21 @@ void ConnectionManager::onConnectPressed()
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
//only do this if we are disconnecting
|
||||
//signal interested plugins that user is disconnecting his device
|
||||
emit deviceDisconnected();
|
||||
if(m_connectionDevice.connection){
|
||||
if(m_connectionDevice.connection)
|
||||
{
|
||||
m_connectionDevice.connection->closeDevice(m_connectionDevice.devName);
|
||||
m_ioDev = NULL;
|
||||
m_connectionDevice.connection = NULL;
|
||||
}
|
||||
|
||||
m_connectBtn->setText("Connect");
|
||||
m_availableDevList->setEnabled(true);
|
||||
}
|
||||
|
||||
|
||||
//both in case of error and disconnection, we fall back here
|
||||
m_connectBtn->setText("Connect");
|
||||
m_availableDevList->setEnabled(true);
|
||||
|
||||
|
||||
/*//close the device
|
||||
if(m_ioDev)
|
||||
{
|
||||
m_ioDev->close();
|
||||
|
||||
//delete the object created by the IConnection class
|
||||
delete m_ioDev;
|
||||
m_ioDev = NULL;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -623,10 +623,13 @@ void ManhattanStyle::drawPrimitive(PrimitiveElement element, const QStyleOption
|
||||
int size = qMin(r.height(), r.width());
|
||||
QPixmap pixmap;
|
||||
QString pixmapName;
|
||||
pixmapName.sprintf("%s-%s-%d-%d-%d-%lld",
|
||||
"$qt_ia", metaObject()->className(),
|
||||
uint(option->state), element,
|
||||
size, option->palette.cacheKey());
|
||||
QTextStream(&pixmapName) << "$qt_ia" << "-" << metaObject()->className() <<
|
||||
"-" << uint(option->state) << "-" << element << "-" << size <<
|
||||
"-" << option->palette.cacheKey();
|
||||
// pixmapName.sprintf("%s-%s-%d-%d-%d-%lld",
|
||||
// "$qt_ia", metaObject()->className(),
|
||||
// uint(option->state), element,
|
||||
// size, option->palette.cacheKey());
|
||||
if (!QPixmapCache::find(pixmapName, pixmap)) {
|
||||
int border = size/5;
|
||||
int sqsize = 2*(size/2);
|
||||
|
@ -209,7 +209,7 @@ int pjrc_rawhid::receive(int num, void *buf, int len, int timeout)
|
||||
|
||||
// qDebug("Received %i bytes, first %x, second %x", len, *((char *) buf),*((char *)buf + 1));
|
||||
|
||||
if (n > len) n = len;
|
||||
if ((int)n > len) n = len;
|
||||
return n;
|
||||
return_timeout:
|
||||
CancelIo(hid->handle);
|
||||
|
@ -95,7 +95,7 @@ private:
|
||||
quint8 rxType;
|
||||
quint32 rxObjId;
|
||||
quint16 rxInstId;
|
||||
quint8 rxLength;
|
||||
quint16 rxLength;
|
||||
quint8 rxCSPacket, rxCS;
|
||||
qint32 rxCount;
|
||||
RxStateType rxState;
|
||||
|
Loading…
x
Reference in New Issue
Block a user