1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

GCS/glclib: Quiet down some compiler warnings.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1300 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
ephy 2010-08-15 14:02:11 +00:00 committed by ephy
parent ddbd4f8c80
commit 45d2d82322
19 changed files with 38 additions and 28 deletions

View File

@ -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;
}
@ -62,7 +62,7 @@ lib3ds_chunk_debug_dump(Lib3dsChunk *c)
lib3ds_chunk_level,
lib3ds_chunk_name(c->chunk),
c->chunk,
c->size
(long unsigned int)c->size
);
}
}
@ -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);
}

View File

@ -1940,6 +1940,13 @@ file_bounding_box_of_nodes_impl(Lib3dsNode *node, Lib3dsFile *file, Lib3dsBool i
}
}
break;
case LIB3DS_UNKNOWN_NODE:
case LIB3DS_AMBIENT_NODE:
case LIB3DS_CAMERA_NODE:
case LIB3DS_TARGET_NODE:
case LIB3DS_LIGHT_NODE:
case LIB3DS_SPOT_NODE:
break;
/*
case LIB3DS_CAMERA_NODE:
case LIB3DS_TARGET_NODE:

View File

@ -30,7 +30,7 @@
/*!
* \defgroup light Lights
*/
/*!
/*!

View File

@ -570,8 +570,8 @@ lib3ds_mesh_dump(Lib3dsMesh *mesh)
ASSERT(mesh);
printf(" %s vertices=%ld faces=%ld\n",
mesh->name,
mesh->points,
mesh->faces
(long int)mesh->points,
(long int)mesh->faces
);
printf(" matrix:\n");
lib3ds_matrix_dump(mesh->matrix);

View File

@ -70,7 +70,7 @@ typedef enum {
/* Bit 11-12: Unused ? */
LIB3DS_FACE_FLAG_SELECT_3 = (1<<13), /*!< Bit 13: Selection of the face in selection 3*/
LIB3DS_FACE_FLAG_SELECT_2 = (1<<14), /*!< Bit 14: Selection of the face in selection 2*/
LIB3DS_FACE_FLAG_SELECT_1 = (1<<15), /*!< Bit 15: Selection of the face in selection 1*/
LIB3DS_FACE_FLAG_SELECT_1 = (1<<15) /*!< Bit 15: Selection of the face in selection 1*/
} Lib3dsFaceFlag;
/**

View File

@ -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;

View File

@ -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);
@ -1548,5 +1548,7 @@ lib3ds_dump_tracks(Lib3dsNode *node)
printf("pos: ");
lib3ds_lin3Track_dump(&node->data.spot.pos_track);
break;
case LIB3DS_UNKNOWN_NODE:
break;
}
}

View File

@ -380,7 +380,7 @@ lib3ds_viewport_dump(Lib3dsViewport *vp)
printf(" position: %d,%d\n",
vp->layout.position[0], vp->layout.position[1]);
printf(" size: %d,%d\n", vp->layout.size[0], vp->layout.size[1]);
printf(" views: %ld\n", vp->layout.views);
printf(" views: %ld\n", (long int)vp->layout.views);
if (vp->layout.views > 0 && vp->layout.viewL != NULL) {
for(i=0, view=vp->layout.viewL; i < vp->layout.views; ++i, ++view) {
printf(" view %d:\n", i);

View File

@ -32,7 +32,7 @@
/***********************************************************************
* Return the next byte in the pseudo-random sequence
*/
static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab __attribute((unused)))
{
//(void) pcrc_32_tab; /* avoid "unused parameter" warning */
unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an

View File

@ -66,7 +66,7 @@ int ZCALLBACK ferror_file_func OF((
voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
voidpf opaque;
voidpf opaque __attribute((unused));
const char* filename;
int mode;
{
@ -89,7 +89,7 @@ voidpf ZCALLBACK fopen_file_func (opaque, filename, mode)
uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
void* buf;
uLong size;
@ -102,7 +102,7 @@ uLong ZCALLBACK fread_file_func (opaque, stream, buf, size)
uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
const void* buf;
uLong size;
@ -114,7 +114,7 @@ uLong ZCALLBACK fwrite_file_func (opaque, stream, buf, size)
}
long ZCALLBACK ftell_file_func (opaque, stream)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
{
//(void) opaque; /* avoid "unused parameter" warning */
@ -124,7 +124,7 @@ long ZCALLBACK ftell_file_func (opaque, stream)
}
long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
uLong offset;
int origin;
@ -151,7 +151,7 @@ long ZCALLBACK fseek_file_func (opaque, stream, offset, origin)
}
int ZCALLBACK fclose_file_func (opaque, stream)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
{
//(void) opaque; /* avoid "unused parameter" warning */
@ -161,7 +161,7 @@ int ZCALLBACK fclose_file_func (opaque, stream)
}
int ZCALLBACK ferror_file_func (opaque, stream)
voidpf opaque;
voidpf opaque __attribute((unused));
voidpf stream;
{
//(void) opaque; /* avoid "unused parameter" warning */

View File

@ -318,7 +318,7 @@ local void ziplocal_putValue_inmemory (dest, x, nbByte)
local uLong ziplocal_TmzDateToDosDate(ptm,dosDate)
const tm_zip* ptm;
uLong dosDate;
uLong dosDate __attribute((unused));
{
//(void) dosDate; /* avoid "unused parameter" warning */
uLong year = (uLong)ptm->tm_year;

View File

@ -86,5 +86,5 @@ namespace glc
//! Load Point Sprite extension
bool loadPointSpriteExtension();
};
}
#endif /*GLC_EXT_H_*/

View File

@ -105,7 +105,7 @@ namespace glc
//! Return Archive entry filname from the given archive string
GLC_LIB_EXPORT QString archiveEntryFileName(const QString& archiveString);
};
}
// Return the GLC_uint decoded ID from RGBA encoded ID
GLC_uint glc::decodeRgbId(const GLubyte* pcolorId)

View File

@ -103,6 +103,6 @@ namespace glc
//@}
};
}
#endif /*GLC_GEOMTOOLS_H_*/

View File

@ -43,6 +43,6 @@ namespace glc
//! Convert the given degre angle in radian
inline double toRadian(double angle)
{return PI * angle / 180.0;}
};
}
#endif /*GLC_UTILS_MATHS_H_*/

View File

@ -270,7 +270,7 @@ namespace glc
/*! \var Z_AXIS
* \brief Z axis Vector*/
const GLC_Vector3d Z_AXIS(0.0, 0.0, 1.0);
};
}
//! Define GLC_Point3D
typedef GLC_Vector3d GLC_Point3d;

View File

@ -58,7 +58,7 @@ namespace glc
WireRenderFlag,
TransparentRenderFlag
};
};
}
//////////////////////////////////////////////////////////////////////
//! \class GLC_RenderProperties
/*! \brief GLC_RenderProperties encapsulate the render properties

View File

@ -37,7 +37,8 @@ GLC_MoverController::GLC_MoverController()
// Copy constructor
GLC_MoverController::GLC_MoverController(const GLC_MoverController& controller)
: m_ActiveMoverId(controller.m_ActiveMoverId)
: QObject()
, m_ActiveMoverId(controller.m_ActiveMoverId)
, m_MoverHash()
{
MoverHash::const_iterator iMover= controller.m_MoverHash.constBegin();

View File

@ -142,7 +142,7 @@ SettingsDialog::SettingsDialog(QWidget *parent, const QString &categoryId,
{
firstUavGadgetOptionsPageFound = true;
QTreeWidgetItem *separator = new QTreeWidgetItem(pageTree);
separator->setFlags(item->flags() & ~Qt::ItemIsSelectable);
separator->setFlags(item->flags() & ~Qt::ItemIsSelectable & ~Qt::ItemIsEnabled);
separator->setText(0, QString(30, 0xB7));
}
}