From David Callu, warning fixes and removal of spaces at end of lines.

This commit is contained in:
Robert Osfield
2013-06-28 12:00:43 +00:00
parent d82768417d
commit 097aedf23c
100 changed files with 496 additions and 428 deletions

View File

@@ -347,7 +347,7 @@ void GLBufferObject::Extensions::setupGLExtensions(unsigned int contextID)
setGLExtensionFuncPtr(_glBindBufferRange, "glBindBufferRange");
setGLExtensionFuncPtr(_glBindBufferBase, "glBindBufferBase");
setGLExtensionFuncPtr(_glTexBuffer, "glTexBuffer","glTexBufferARB" );
_isPBOSupported = OSG_GL3_FEATURES || osg::isGLExtensionSupported(contextID,"GL_ARB_pixel_buffer_object");
_isUniformBufferObjectSupported = osg::isGLExtensionSupported(contextID, "GL_ARB_uniform_buffer_object");
_isTBOSupported = osg::isGLExtensionSupported(contextID,"GL_ARB_texture_buffer_object");
@@ -687,7 +687,7 @@ void GLBufferObjectSet::discardAllDeletedGLBufferObjects()
_orphanedGLBufferObjects.clear();
}
void GLBufferObjectSet::flushDeletedGLBufferObjects(double currentTime, double& availableTime)
void GLBufferObjectSet::flushDeletedGLBufferObjects(double /*currentTime*/, double& availableTime)
{
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);

View File

@@ -45,7 +45,7 @@ void GeometryCostEstimator::setDefaults()
_displayListCompileFactor = 10.0;
}
void GeometryCostEstimator::calibrate(osg::RenderInfo& renderInfo)
void GeometryCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
{
}
@@ -91,7 +91,7 @@ CostPair GeometryCostEstimator::estimateCompileCost(const osg::Geometry* geometr
}
}
CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* geometry) const
CostPair GeometryCostEstimator::estimateDrawCost(const osg::Geometry* /*geometry*/) const
{
return CostPair(0.0,0.0);
}
@@ -114,7 +114,7 @@ void TextureCostEstimator::setDefaults()
_drawCost.set(min_time, 1.0/gpu_bandwidth, 256); // min time 1/10th of millisecond, min size 256
}
void TextureCostEstimator::calibrate(osg::RenderInfo& renderInfo)
void TextureCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
{
}
@@ -130,7 +130,7 @@ CostPair TextureCostEstimator::estimateCompileCost(const osg::Texture* texture)
return cost;
}
CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* texture) const
CostPair TextureCostEstimator::estimateDrawCost(const osg::Texture* /*texture*/) const
{
return CostPair(0.0,0.0);
}
@@ -147,16 +147,16 @@ void ProgramCostEstimator::setDefaults()
{
}
void ProgramCostEstimator::calibrate(osg::RenderInfo& renderInfo)
void ProgramCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
{
}
CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* program) const
CostPair ProgramCostEstimator::estimateCompileCost(const osg::Program* /*program*/) const
{
return CostPair(0.0,0.0);
}
CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* program) const
CostPair ProgramCostEstimator::estimateDrawCost(const osg::Program* /*program*/) const
{
return CostPair(0.0,0.0);
}
@@ -185,7 +185,7 @@ void GraphicsCostEstimator::setDefaults()
}
void GraphicsCostEstimator::calibrate(osg::RenderInfo& renderInfo)
void GraphicsCostEstimator::calibrate(osg::RenderInfo& /*renderInfo*/)
{
OSG_INFO<<"GraphicsCostEstimator::calibrate(..)"<<std::endl;
}

View File

@@ -795,6 +795,7 @@ KdTreeBuilder::KdTreeBuilder():
}
KdTreeBuilder::KdTreeBuilder(const KdTreeBuilder& rhs):
osg::Referenced(true),
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
_buildOptions(rhs._buildOptions),
_kdTreePrototype(rhs._kdTreePrototype)

View File

@@ -29,7 +29,7 @@ namespace osg
class NullStreamBuffer : public std::streambuf
{
private:
std::streamsize xsputn(const std::streambuf::char_type *str, std::streamsize n)
std::streamsize xsputn(const std::streambuf::char_type */*str*/, std::streamsize n)
{
return n;
}

View File

@@ -110,6 +110,8 @@ void DrawArrayLengths::draw(State& state, bool) const
}
if (mode==GL_POLYGON) mode = GL_TRIANGLE_FAN;
if (mode==GL_QUAD_STRIP) mode = GL_TRIANGLE_STRIP;
#else
OSG_UNUSED(state);
#endif
GLint first = _first;

View File

@@ -110,6 +110,8 @@ void Referenced::setThreadSafeReferenceCounting(bool enableThreadSafeReferenceCo
{
#if !defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
s_useThreadSafeReferenceCounting = enableThreadSafeReferenceCounting;
#else
OSG_UNUSED(enableThreadSafeReferenceCounting);
#endif
}
@@ -182,8 +184,12 @@ Referenced::Referenced(bool threadSafeRefUnref):
#if !defined(_OSG_REFERENCED_USE_ATOMIC_OPERATIONS)
#ifndef ENFORCE_THREADSAFE
if (threadSafeRefUnref)
#else
OSG_UNUSED(threadSafeRefUnref);
#endif
_refMutex = new OpenThreads::Mutex;
#else
OSG_UNUSED(threadSafeRefUnref);
#endif
#ifdef DEBUG_OBJECT_ALLOCATION_DESTRUCTION
@@ -347,6 +353,8 @@ void Referenced::setThreadSafeRefUnref(bool threadSafe)
delete tmpMutexPtr;
}
}
#else
OSG_UNUSED(threadSafe);
#endif
}

View File

@@ -108,7 +108,8 @@ ShaderBinary::ShaderBinary()
{
}
ShaderBinary::ShaderBinary(const ShaderBinary& rhs, const osg::CopyOp&):
ShaderBinary::ShaderBinary(const ShaderBinary& rhs, const osg::CopyOp& copyop):
osg::Object(rhs, copyop),
_data(rhs._data)
{
}

View File

@@ -80,7 +80,7 @@ void ShaderAttribute::removeUniform(unsigned int i)
_uniforms.erase(_uniforms.begin()+i);
}
bool ShaderAttribute::getModeUsage(StateAttribute::ModeUsage& usage) const
bool ShaderAttribute::getModeUsage(StateAttribute::ModeUsage& /*usage*/) const
{
return false;
}

View File

@@ -401,7 +401,7 @@ void Texture::TextureObjectSet::discardAllDeletedTextureObjects()
_orphanedTextureObjects.clear();
}
void Texture::TextureObjectSet::flushDeletedTextureObjects(double currentTime, double& availableTime)
void Texture::TextureObjectSet::flushDeletedTextureObjects(double /*currentTime*/, double& availableTime)
{
// OSG_NOTICE<<"Texture::TextureObjectSet::flushDeletedTextureObjects(..)"<<std::endl;
@@ -1075,7 +1075,7 @@ Texture::Texture():
_min_filter(LINEAR_MIPMAP_LINEAR), // trilinear
_mag_filter(LINEAR),
_maxAnisotropy(1.0f),
_swizzle(GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA),
_swizzle(GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA),
_useHardwareMipMapGeneration(true),
_unrefImageDataAfterApply(false),
_clientStorageHint(false),
@@ -1102,7 +1102,7 @@ Texture::Texture(const Texture& text,const CopyOp& copyop):
_min_filter(text._min_filter),
_mag_filter(text._mag_filter),
_maxAnisotropy(text._maxAnisotropy),
_swizzle(text._swizzle),
_swizzle(text._swizzle),
_useHardwareMipMapGeneration(text._useHardwareMipMapGeneration),
_unrefImageDataAfterApply(text._unrefImageDataAfterApply),
_clientStorageHint(text._clientStorageHint),
@@ -1459,7 +1459,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
default: break;
}
#endif
_internalFormat = internalFormat;

View File

@@ -91,7 +91,7 @@ DictNode *dictInsertBefore( Dict *dict, DictNode *node, DictKey key )
}
/* really __gl_dictListDelete */
void dictDelete( Dict *dict, DictNode *node ) /*ARGSUSED*/
void dictDelete( Dict */*dict*/, DictNode *node ) /*ARGSUSED*/
{
node->next->prev = node->prev;
node->prev->next = node->next;

View File

@@ -35,7 +35,7 @@
#include "memalloc.h"
#include "string.h"
int __gl_memInit( size_t maxFast )
int __gl_memInit( size_t /*maxFast*/ )
{
#ifndef NO_MALLOPT
/* mallopt( M_MXFAST, maxFast );*/

View File

@@ -3293,7 +3293,7 @@ static void scale_internal_float(GLint components, GLint widthin,
}
}
static int checkMipmapArgs(GLenum internalFormat, GLenum format, GLenum type)
static int checkMipmapArgs(GLenum /*internalFormat*/, GLenum format, GLenum type)
{
if (!legalFormat(format) || !legalType(type)) {
return GLU_INVALID_ENUM;
@@ -3344,7 +3344,7 @@ static GLboolean legalType(GLenum type)
case GL_UNSIGNED_INT:
case GL_FLOAT:
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
case GL_UNSIGNED_SHORT_4_4_4_4:
@@ -3442,7 +3442,7 @@ static void closestFit(GLenum target, GLint width, GLint height,
if ( (strtod((const char *)glGetString(GL_VERSION),NULL) >= 1.1)
) {
GLint widthPowerOf2= nearestPower(width);
GLint heightPowerOf2= nearestPower(height);
GLint heightPowerOf2= nearestPower(height);
GLint proxyWidth;
do {
@@ -4613,7 +4613,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat,
}
} /* for level */
glPixelStorei(GL_UNPACK_ALIGNMENT, psm.unpack_alignment);
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
glPixelStorei(GL_UNPACK_SKIP_ROWS, psm.unpack_skip_rows);
glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels);
@@ -4905,7 +4905,7 @@ static GLfloat bytes_per_element(GLenum type)
case GL_FLOAT:
return(sizeof(GLfloat));
case GL_UNSIGNED_BYTE_3_3_2:
case GL_UNSIGNED_BYTE_2_3_3_REV:
case GL_UNSIGNED_BYTE_2_3_3_REV:
return(sizeof(GLubyte));
case GL_UNSIGNED_SHORT_5_6_5:
case GL_UNSIGNED_SHORT_5_6_5_REV:
@@ -6220,7 +6220,7 @@ static void scaleInternalPackedPixel(int components,
#endif
/* calculate the value for pixels in the last row */
y_percent = highy_float;
percent = y_percent * (1-lowx_float);
temp = (const char *)dataIn + xindex + highy_int * rowSizeInBytes;
@@ -7427,13 +7427,13 @@ int gluScaleImage3D(GLenum format,
static void closestFit3D(GLTexImage3DProc gluTexImage3D,
GLenum target, GLint width, GLint height, GLint depth,
GLenum /*target*/, GLint width, GLint height, GLint depth,
GLint internalFormat, GLenum format, GLenum type,
GLint *newWidth, GLint *newHeight, GLint *newDepth)
{
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)
GLint widthPowerOf2= nearestPower(width);
GLint heightPowerOf2= nearestPower(height);
GLint heightPowerOf2= nearestPower(height);
GLint depthPowerOf2= nearestPower(depth);
GLint proxyWidth;
@@ -7534,7 +7534,7 @@ static void halveImagePackedPixelSlice(int components,
}
totals[cc]/= (float)BOX2;
} /* for cc */
(*shovePackedPixel)(totals,outIndex,dataOut);
outIndex++;
/* skip over to next group of 2 */
@@ -8280,7 +8280,7 @@ static int gluBuild3DMipmapLevelsCore(GLTexImage3DProc gluTexImage3D,
}
}
/* level userLevel is in srcImage; nothing saved yet */
level = userLevel;
level = userLevel;
}
#if !defined(OSG_GLES1_AVAILABLE) && !defined(OSG_GLES2_AVAILABLE)