Fixed L4 warnings.

This commit is contained in:
bkaradzic
2013-03-25 21:13:54 -07:00
parent 07dc7b2c5f
commit 6582276e3e
17 changed files with 25 additions and 25 deletions

View File

@@ -757,7 +757,7 @@ stbi_inline static uint8 get8u(stbi *s)
static void skip(stbi *s, int n)
{
if (s->io.read) {
int blen = s->img_buffer_end - s->img_buffer;
int blen = (int)(s->img_buffer_end - s->img_buffer);
if (blen < n) {
s->img_buffer = s->img_buffer_end;
(s->io.skip)(s->io_user_data, n - blen);
@@ -770,7 +770,7 @@ static void skip(stbi *s, int n)
static int getn(stbi *s, stbi_uc *buffer, int n)
{
if (s->io.read) {
int blen = s->img_buffer_end - s->img_buffer;
int blen = (int)(s->img_buffer_end - s->img_buffer);
if (blen < n) {
int res, count;

View File

@@ -9,7 +9,7 @@
#include "../common/dbg.h"
#include "../common/processevents.h"
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -94,7 +94,7 @@ static const bgfx::Memory* loadShader(const char* _name)
return load(filePath);
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -494,7 +494,7 @@ uint32_t triangulate(uint8_t* _result, uint32_t _stride, const float* __restrict
return num;
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -173,7 +173,7 @@ void renderScreenSpaceQuad(uint32_t _view, bgfx::ProgramHandle _program, float _
}
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -278,7 +278,7 @@ struct Mesh
GroupArray m_groups;
};
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -94,7 +94,7 @@ static const bgfx::Memory* loadShader(const char* _name)
return load(filePath);
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -250,7 +250,7 @@ void calcTangents(void* _vertices, uint16_t _numVertices, bgfx::VertexDecl _decl
delete [] tangents;
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -223,7 +223,7 @@ struct BgfxCallback : public bgfx::CallbackI
saveTga(_filePath, _width, _height, _pitch, _data, false, _yflip);
}
virtual void captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, bgfx::TextureFormat::Enum /*_format*/, bool _yflip) BX_OVERRIDE
virtual void captureBegin(uint32_t _width, uint32_t _height, uint32_t /*_pitch*/, bgfx::TextureFormat::Enum /*_format*/, bool _yflip) BX_OVERRIDE
{
m_writer = new AviWriter;
if (!m_writer->open("temp/capture.avi", _width, _height, 60, _yflip) )
@@ -254,7 +254,7 @@ struct BgfxCallback : public bgfx::CallbackI
AviWriter* m_writer;
};
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
BgfxCallback callback;

View File

@@ -125,7 +125,7 @@ static const bgfx::Memory* loadShader(const char* _name)
return load(filePath);
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
uint32_t width = 1280;
uint32_t height = 720;

View File

@@ -403,7 +403,7 @@ inline float square(float _x)
return _x*_x;
}
int _main_(int _argc, char** _argv)
int _main_(int /*_argc*/, char** /*_argv*/)
{
PosColorTexCoord0Vertex::init();

View File

@@ -305,9 +305,6 @@ namespace entry
default:
{
unsigned int oldWidth = width;
unsigned int oldHeight = height;
float aspectRatio = m_aspectRatio;
height = bx::uint32_max(DEFAULT_HEIGHT/4, height);
width = uint32_t(float(height)*aspectRatio);

View File

@@ -69,7 +69,7 @@ namespace bgfx
return context;
}
void GlContext::create(uint32_t _width, uint32_t _height)
void GlContext::create(uint32_t /*_width*/, uint32_t /*_height*/)
{
m_opengl32dll = LoadLibrary("opengl32.dll");
BGFX_FATAL(NULL != m_opengl32dll, Fatal::UnableToInitialize, "Failed to load opengl32.dll.");
@@ -200,6 +200,7 @@ namespace bgfx
BGFX_FATAL(0 != result, Fatal::UnableToInitialize, "SetPixelFormat failed (last err: 0x%08x)!", GetLastError() );
uint32_t flags = BGFX_CONFIG_DEBUG ? WGL_CONTEXT_DEBUG_BIT_ARB : 0;
BX_UNUSED(flags);
int32_t contextAttrs[] =
{
#if BGFX_CONFIG_RENDERER_OPENGL >= 31
@@ -252,7 +253,7 @@ namespace bgfx
m_opengl32dll = NULL;
}
void GlContext::resize(uint32_t _width, uint32_t _height)
void GlContext::resize(uint32_t /*_width*/, uint32_t /*_height*/)
{
}

View File

@@ -213,7 +213,7 @@ namespace bgfx
},
};
static D3D11_INPUT_ELEMENT_DESC* fillVertexDecl(D3D11_INPUT_ELEMENT_DESC* _out, uint32_t _count, const VertexDecl& _decl)
static D3D11_INPUT_ELEMENT_DESC* fillVertexDecl(D3D11_INPUT_ELEMENT_DESC* _out, const VertexDecl& _decl)
{
D3D11_INPUT_ELEMENT_DESC* elem = _out;
@@ -532,6 +532,7 @@ namespace bgfx
void setRenderTarget(RenderTargetHandle _rt, bool _msaa = true)
{
BX_UNUSED(_msaa);
if (_rt.idx == invalidHandle)
{
m_deviceCtx->OMSetRenderTargets(1, &m_backBufferColor, m_backBufferDepthStencil);
@@ -591,7 +592,7 @@ namespace bgfx
decl.m_attributes[ii] = attr == 0 ? 0xff : attr == 0xff ? 0 : attr;
}
D3D11_INPUT_ELEMENT_DESC* elem = fillVertexDecl(vertexElements, Attrib::Count, decl);
D3D11_INPUT_ELEMENT_DESC* elem = fillVertexDecl(vertexElements, decl);
uint32_t num = uint32_t(elem-vertexElements);
const D3D11_INPUT_ELEMENT_DESC inst = { "TEXCOORD", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, D3D11_APPEND_ALIGNED_ELEMENT, D3D11_INPUT_PER_INSTANCE_DATA, 1 };
@@ -1230,6 +1231,7 @@ namespace bgfx
void ClearQuad::clear(const Rect& _rect, const Clear& _clear, uint32_t _height)
{
BX_UNUSED(_height);
uint32_t width = s_renderCtx.m_scd.BufferDesc.Width;
uint32_t height = s_renderCtx.m_scd.BufferDesc.Height;

View File

@@ -1043,7 +1043,7 @@ namespace bgfx
},
};
static D3DVERTEXELEMENT9* fillVertexDecl(D3DVERTEXELEMENT9* _out, uint32_t _count, const VertexDecl& _decl)
static D3DVERTEXELEMENT9* fillVertexDecl(D3DVERTEXELEMENT9* _out, const VertexDecl& _decl)
{
D3DVERTEXELEMENT9* elem = _out;
@@ -1071,7 +1071,7 @@ namespace bgfx
static IDirect3DVertexDeclaration9* createVertexDecl(const VertexDecl& _decl, uint8_t _numInstanceData)
{
D3DVERTEXELEMENT9 vertexElements[Attrib::Count+1+BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT];
D3DVERTEXELEMENT9* elem = fillVertexDecl(vertexElements, Attrib::Count, _decl);
D3DVERTEXELEMENT9* elem = fillVertexDecl(vertexElements, _decl);
const D3DVERTEXELEMENT9 inst = { 1, 0, D3DDECLTYPE_FLOAT4, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0 };
@@ -2067,7 +2067,7 @@ namespace bgfx
s_renderCtx.m_updateTexture->updateBegin(_side, _mip);
}
void Context::rendererUpdateTexture(TextureHandle _handle, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, const Memory* _mem)
void Context::rendererUpdateTexture(TextureHandle /*_handle*/, uint8_t _side, uint8_t _mip, const Rect& _rect, uint16_t _z, uint16_t _depth, const Memory* _mem)
{
s_renderCtx.m_updateTexture->update(_side, _mip, _rect, _z, _depth, _mem);
}

View File

@@ -2334,7 +2334,7 @@ namespace bgfx
s_renderCtx.m_textures[_handle.idx].create(_mem, _flags);
}
void Context::rendererUpdateTextureBegin(TextureHandle _handle, uint8_t _side, uint8_t _mip)
void Context::rendererUpdateTextureBegin(TextureHandle /*_handle*/, uint8_t /*_side*/, uint8_t /*_mip*/)
{
}

View File

@@ -1136,7 +1136,7 @@ struct Preprocessor
thisClass->m_preprocessed += _ch;
}
static void fppError(void* _userData, char* _format, va_list _vargs)
static void fppError(void* /*_userData*/, char* _format, va_list _vargs)
{
vfprintf(stderr, _format, _vargs);
}