1
0
Fork 0

(svn r7219) -Fix: Several warnings by gcc introduced in r7206 which MSVC found not of a problem. Thanks Tron

release/0.5
Darkvater 2006-11-19 22:24:18 +00:00
parent fb1bb34774
commit ba9f22cee6
7 changed files with 16 additions and 20 deletions

View File

@ -152,7 +152,7 @@ static void IConsoleWndProc(Window *w, WindowEvent *e)
break; break;
case WKC_CTRL | WKC_RETURN: case WKC_CTRL | WKC_RETURN:
_iconsole_mode = (_iconsole_mode == ICONSOLE_FULL) ? ICONSOLE_OPENED : ICONSOLE_FULL; _iconsole_mode = (_iconsole_mode == ICONSOLE_FULL) ? ICONSOLE_OPENED : ICONSOLE_FULL;
IConsoleResize(w); IConsoleResize();
MarkWholeScreenDirty(); MarkWholeScreenDirty();
break; break;
case (WKC_CTRL | 'V'): case (WKC_CTRL | 'V'):
@ -283,10 +283,8 @@ void IConsoleFree(void)
CloseConsoleLogIfActive(); CloseConsoleLogIfActive();
} }
void IConsoleResize(Window *w) void IConsoleResize(void)
{ {
assert(_iconsole_win == w);
switch (_iconsole_mode) { switch (_iconsole_mode) {
case ICONSOLE_OPENED: case ICONSOLE_OPENED:
_iconsole_win->height = _screen.height / 3; _iconsole_win->height = _screen.height / 3;

View File

@ -118,7 +118,7 @@ VARDEF IConsoleModes _iconsole_mode;
void IConsoleInit(void); void IConsoleInit(void);
void IConsoleFree(void); void IConsoleFree(void);
void IConsoleClearBuffer(void); void IConsoleClearBuffer(void);
void IConsoleResize(Window *w); void IConsoleResize(void);
void IConsoleSwitch(void); void IConsoleSwitch(void);
void IConsoleClose(void); void IConsoleClose(void);
void IConsoleOpen(void); void IConsoleOpen(void);

View File

@ -115,7 +115,7 @@ static const WindowDesc _engine_preview_desc = {
void ShowEnginePreviewWindow(EngineID engine) void ShowEnginePreviewWindow(EngineID engine)
{ {
Window *w = AllocateWindowDescFront(&_engine_preview_desc, engine); AllocateWindowDescFront(&_engine_preview_desc, engine);
} }
static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw) static void DrawTrainEngineInfo(EngineID engine, int x, int y, int maxw)

View File

@ -1852,10 +1852,8 @@ static const WindowDesc _cheats_desc = {
void ShowCheatWindow(void) void ShowCheatWindow(void)
{ {
Window *w;
DeleteWindowById(WC_CHEATS, 0); DeleteWindowById(WC_CHEATS, 0);
w = AllocateWindowDesc(&_cheats_desc); AllocateWindowDesc(&_cheats_desc);
} }
/** Resize the widgets in a window /** Resize the widgets in a window

View File

@ -194,7 +194,7 @@ void SndCopyToPool(void)
static void SndPlayScreenCoordFx(SoundFx sound, int x, int y) static void SndPlayScreenCoordFx(SoundFx sound, int x, int y)
{ {
const Window* const *wz; Window* const *wz;
if (msf.effect_vol == 0) return; if (msf.effect_vol == 0) return;

View File

@ -183,7 +183,7 @@ void AssignWindowViewport(Window *w, int x, int y,
static Point _vp_move_offs; static Point _vp_move_offs;
static void DoSetViewportPosition(const Window* const *wz, int left, int top, int width, int height) static void DoSetViewportPosition(Window* const *wz, int left, int top, int width, int height)
{ {
for (; wz != _last_z_window; wz++) { for (; wz != _last_z_window; wz++) {

View File

@ -222,7 +222,7 @@ void DrawOverlappedWindowForAll(int left, int top, int right, int bottom)
static void DrawOverlappedWindow(Window* const *wz, int left, int top, int right, int bottom) static void DrawOverlappedWindow(Window* const *wz, int left, int top, int right, int bottom)
{ {
const Window* const *vz = wz; Window* const *vz = wz;
int x; int x;
while (++vz != _last_z_window) { while (++vz != _last_z_window) {
@ -1058,7 +1058,7 @@ static bool HandleWindowDragging(void)
ny = y; ny = y;
if (_patches.window_snap_radius != 0) { if (_patches.window_snap_radius != 0) {
const Window* const *vz; Window* const *vz;
int hsnap = _patches.window_snap_radius; int hsnap = _patches.window_snap_radius;
int vsnap = _patches.window_snap_radius; int vsnap = _patches.window_snap_radius;
@ -1370,8 +1370,8 @@ static bool HandleViewportScroll(void)
static void MaybeBringWindowToFront(const Window *w) static void MaybeBringWindowToFront(const Window *w)
{ {
const Window* const *wz; Window* const *wz;
const Window* const *uz; Window* const *uz;
if (w->window_class == WC_MAIN_WINDOW || if (w->window_class == WC_MAIN_WINDOW ||
IsVitalWindow(w) || IsVitalWindow(w) ||
@ -1725,7 +1725,7 @@ int GetMenuItemIndex(const Window *w, int x, int y)
void InvalidateWindow(WindowClass cls, WindowNumber number) void InvalidateWindow(WindowClass cls, WindowNumber number)
{ {
const Window* const *wz; Window* const *wz;
FOR_ALL_WINDOWS(wz) { FOR_ALL_WINDOWS(wz) {
const Window *w = *wz; const Window *w = *wz;
@ -1745,7 +1745,7 @@ void InvalidateWidget(const Window *w, byte widget_index)
void InvalidateWindowWidget(WindowClass cls, WindowNumber number, byte widget_index) void InvalidateWindowWidget(WindowClass cls, WindowNumber number, byte widget_index)
{ {
const Window* const *wz; Window* const *wz;
FOR_ALL_WINDOWS(wz) { FOR_ALL_WINDOWS(wz) {
const Window *w = *wz; const Window *w = *wz;
@ -1757,7 +1757,7 @@ void InvalidateWindowWidget(WindowClass cls, WindowNumber number, byte widget_in
void InvalidateWindowClasses(WindowClass cls) void InvalidateWindowClasses(WindowClass cls)
{ {
const Window* const *wz; Window* const *wz;
FOR_ALL_WINDOWS(wz) { FOR_ALL_WINDOWS(wz) {
if ((*wz)->window_class == cls) SetWindowDirty(*wz); if ((*wz)->window_class == cls) SetWindowDirty(*wz);
@ -1917,8 +1917,8 @@ void RelocateAllWindows(int neww, int newh)
break; break;
case WC_CONSOLE: case WC_CONSOLE:
IConsoleResize(w); IConsoleResize();
break; continue;
default: default:
left = w->left; left = w->left;