forked from Mirrorlandia_minetest/irrlicht
Avoid some gcc warnings.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6001 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@ -295,7 +295,7 @@ s32 CGUITabControl::insertTab(s32 idx, IGUITab* tab, bool serializationMode)
|
|||||||
return -1;
|
return -1;
|
||||||
// Not allowing to add same tab twice as it would make things complicated (serialization or setting active visible)
|
// Not allowing to add same tab twice as it would make things complicated (serialization or setting active visible)
|
||||||
if ( getTabIndex(tab) >= 0 )
|
if ( getTabIndex(tab) >= 0 )
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if ( idx < 0 )
|
if ( idx < 0 )
|
||||||
idx = (s32)Tabs.size();
|
idx = (s32)Tabs.size();
|
||||||
@ -380,7 +380,7 @@ void CGUITabControl::removeTabButNotChild(s32 idx)
|
|||||||
}
|
}
|
||||||
else if ( idx == ActiveTabIndex )
|
else if ( idx == ActiveTabIndex )
|
||||||
{
|
{
|
||||||
if ( idx == Tabs.size() )
|
if ( (u32)idx == Tabs.size() )
|
||||||
--ActiveTabIndex;
|
--ActiveTabIndex;
|
||||||
setVisibleTab(ActiveTabIndex);
|
setVisibleTab(ActiveTabIndex);
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,6 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||||||
if (!file)
|
if (!file)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
video::IImage* image = 0;
|
|
||||||
//Used to point to image rows
|
//Used to point to image rows
|
||||||
u8** RowPointers = 0;
|
u8** RowPointers = 0;
|
||||||
|
|
||||||
@ -222,6 +221,7 @@ IImage* CImageLoaderPng::loadImage(io::IReadFile* file) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create the image structure to be filled by png data
|
// Create the image structure to be filled by png data
|
||||||
|
video::IImage* image = 0;
|
||||||
if (ColorType==PNG_COLOR_TYPE_RGB_ALPHA)
|
if (ColorType==PNG_COLOR_TYPE_RGB_ALPHA)
|
||||||
image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(Width, Height));
|
image = new CImage(ECF_A8R8G8B8, core::dimension2d<u32>(Width, Height));
|
||||||
else
|
else
|
||||||
|
@ -188,7 +188,7 @@ int rle_encode (
|
|||||||
{
|
{
|
||||||
unsigned long ret_code;
|
unsigned long ret_code;
|
||||||
|
|
||||||
unsigned char ch;
|
unsigned char ch=0;
|
||||||
|
|
||||||
nCodedBytes=0;
|
nCodedBytes=0;
|
||||||
nReadedBytes=0;
|
nReadedBytes=0;
|
||||||
@ -271,7 +271,7 @@ unsigned long process_comp(
|
|||||||
// we start out with 3 repeating bytes
|
// we start out with 3 repeating bytes
|
||||||
int len = 3;
|
int len = 3;
|
||||||
|
|
||||||
unsigned char ch;
|
unsigned char ch = 0;
|
||||||
|
|
||||||
// we're starting a repeating chunk - end the non-repeaters
|
// we're starting a repeating chunk - end the non-repeaters
|
||||||
flush_outbuf(out_buf, out_buf_size);
|
flush_outbuf(out_buf, out_buf_size);
|
||||||
@ -338,11 +338,12 @@ void flush_outbuf(unsigned char *out_buf, int out_buf_size)
|
|||||||
put_byte((unsigned char)outbuf[pos++], out_buf, out_buf_size);
|
put_byte((unsigned char)outbuf[pos++], out_buf, out_buf_size);
|
||||||
}
|
}
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
void put_byte(unsigned char ch, unsigned char *out_buf, int out_buf_size)
|
void put_byte(unsigned char b, unsigned char *out_buf, int out_buf_size)
|
||||||
{
|
{
|
||||||
if (nCodedBytes<=(out_buf_size-1))
|
if (nCodedBytes<=(out_buf_size-1))
|
||||||
{ out_buf[nCodedBytes++]=ch;
|
{
|
||||||
out_buf[nCodedBytes]=0;
|
out_buf[nCodedBytes++] = b;
|
||||||
|
out_buf[nCodedBytes] = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------
|
//---------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user