Silence various compiler warnings

None of them pointed to a serious problem, fortunately.
floating-point
Günther Brammer 2011-01-03 00:03:28 +01:00
parent 291f124bab
commit 6a17914955
6 changed files with 9 additions and 11 deletions

View File

@ -240,7 +240,6 @@ bool ProcessGroup(const char *FilenamePar)
case 'y':
{
Log("Applying update...");
bool success = false;
unsigned long pid = 0;
bool have_pid = false;

View File

@ -538,7 +538,7 @@ void C4Player::PlaceReadyBase(int32_t &tx, int32_t &ty, C4Object **pFirstBase)
int32_t cnt,cnt2,ctx,cty;
C4Def *def;
C4ID cid;
C4Object *cbase,*fpower=NULL;
C4Object *cbase;
// Create ready base structures
for (cnt=0; (cid=Game.C4S.PlrStart[PlrStartIndex].ReadyBase.GetID(cnt)); cnt++)
{

View File

@ -211,12 +211,12 @@ bool C4UpdateDlg::ApplyUpdate(const char *strUpdateFile, bool fDeleteUpdate, C4G
if (IsWindowsWithUAC()) strUpdateProgEx.Copy(Config.AtTempPath("setup.exe"));
// Extract update program (the update should be applied using the new version)
C4Group UpdateGroup, SubGroup;
char strSubGroup[1024+1];
if (!UpdateGroup.Open(strUpdateFile)) return false;
// Look for update program at top level
if (!UpdateGroup.ExtractEntry(strUpdateProg.getData(), strUpdateProgEx.getData()))
return false;
#if 0
char strSubGroup[1024+1];
// ASK: What is this? Why should an update program not be found at the top
// level? This seems obsolete. - Newton
// Not found: look for an engine update pack one level down

View File

@ -634,10 +634,6 @@ bool CStdDDraw::Blit(SURFACE sfcSource, float fx, float fy, float fwdt, float fh
scaleY2 = scaleY * iTexSizeY;
}
// Size of this texture actually containing image data
const int iImgSizeX = (iX == sfcSource->iTexX-1) ? ((sfcSource->Wdt - 1) % iTexSizeX + 1) : (iTexSizeX);
const int iImgSizeY = (iY == sfcSource->iTexY-1) ? ((sfcSource->Hgt - 1) % iTexSizeY + 1) : (iTexSizeY);
// get new texture source bounds
FLOAT_RECT fTexBlt;
fTexBlt.left = Max<float>(fx - iBlitX, 0);
@ -672,6 +668,9 @@ bool CStdDDraw::Blit(SURFACE sfcSource, float fx, float fy, float fwdt, float fh
// in question is currently fixed by using non-power-of-two
// and non-square textures.
#if 0
// Size of this texture actually containing image data
const int iImgSizeX = (iX == sfcSource->iTexX-1) ? ((sfcSource->Wdt - 1) % iTexSizeX + 1) : (iTexSizeX);
const int iImgSizeY = (iY == sfcSource->iTexY-1) ? ((sfcSource->Hgt - 1) % iTexSizeY + 1) : (iTexSizeY);
// Make sure we don't access border pixels. Normally this is prevented
// by GL_CLAMP_TO_EDGE anyway but for the bottom and rightmost textures
// this does not work as the textures might only be partially filled.

View File

@ -334,7 +334,7 @@ protected:
virtual bool Win32DialogMessageHandling(MSG * msg) { return false; };
#elif defined(USE_X11)
protected:
bool FindInfo(unsigned int samples, void** info);
bool FindInfo(int samples, void** info);
unsigned long wnd;
unsigned long renderwnd;

View File

@ -208,7 +208,7 @@ static std::vector<XVisualInfo> EnumerateVisuals(Display* dpy)
static Window CreateRenderWindow(Display* dpy, Window parent, XVisualInfo* info)
{
XWindowAttributes parent_attr;
if(!XGetWindowAttributes(dpy, parent, &parent_attr)) return NULL;
if(!XGetWindowAttributes(dpy, parent, &parent_attr)) return None;
XSetWindowAttributes attr;
attr.border_pixel = 0;
@ -372,7 +372,7 @@ CStdWindow * CStdWindow::Init(CStdWindow::WindowKind windowKind, CStdApp * pApp,
renderwnd = CreateRenderWindow(dpy, wnd, static_cast<XVisualInfo*>(Info));
if(!renderwnd)
{
XDestroyWindow(dpy, wnd); wnd = NULL;
XDestroyWindow(dpy, wnd); wnd = None;
Log("Error creating render window.");
return NULL;
}
@ -447,7 +447,7 @@ void CStdWindow::Clear()
Info = NULL;
}
bool CStdWindow::FindInfo(unsigned int samples, void** info)
bool CStdWindow::FindInfo(int samples, void** info)
{
#ifdef USE_GL
std::vector<XVisualInfo> infos = EnumerateVisuals(dpy);