Commit ac147fef authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

Fix some -Wsign-compare and -Wuninitialized warnings.

parent 3a9587e0
...@@ -82,7 +82,7 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data ) ...@@ -82,7 +82,7 @@ static DWORD CALLBACK desktop_thread( LPVOID driver_data )
wine_tsx11_lock(); wine_tsx11_lock();
XSaveContext( display, root_window, winContext, (char *)hwnd ); XSaveContext( display, root_window, winContext, (char *)hwnd );
XChangeProperty ( display, root_window, x11drv_atom(WM_PROTOCOLS), XChangeProperty ( display, root_window, x11drv_atom(WM_PROTOCOLS),
XA_ATOM, 32, PropModeReplace, (char *)&atom, 1 ); XA_ATOM, 32, PropModeReplace, (unsigned char *)&atom, 1 );
XMapWindow( display, root_window ); XMapWindow( display, root_window );
wine_tsx11_unlock(); wine_tsx11_unlock();
......
...@@ -513,7 +513,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr ) ...@@ -513,7 +513,7 @@ static Cursor create_cursor( Display *display, CURSORICONINFO *ptr )
bg.blue = bbg * bscale / bgBits; bg.blue = bbg * bscale / bgBits;
} }
else bg.red = bg.green = bg.blue = 0; else bg.red = bg.green = bg.blue = 0;
pixmapBits = XCreateBitmapFromData( display, root_window, pXorBits, xmax, ymax ); pixmapBits = XCreateBitmapFromData( display, root_window, (char *)pXorBits, xmax, ymax );
if (!pixmapBits) if (!pixmapBits)
{ {
XFreePixmap( display, pixmapAll ); XFreePixmap( display, pixmapAll );
......
...@@ -410,7 +410,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) ...@@ -410,7 +410,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
protocols[i++] = x11drv_atom(_NET_WM_PING); protocols[i++] = x11drv_atom(_NET_WM_PING);
if (use_take_focus) protocols[i++] = x11drv_atom(WM_TAKE_FOCUS); if (use_take_focus) protocols[i++] = x11drv_atom(WM_TAKE_FOCUS);
XChangeProperty( display, data->whole_window, x11drv_atom(WM_PROTOCOLS), XChangeProperty( display, data->whole_window, x11drv_atom(WM_PROTOCOLS),
XA_ATOM, 32, PropModeReplace, (char *)protocols, i ); XA_ATOM, 32, PropModeReplace, (unsigned char *)protocols, i );
/* class hints */ /* class hints */
if ((class_hints = XAllocClassHint())) if ((class_hints = XAllocClassHint()))
...@@ -429,9 +429,9 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) ...@@ -429,9 +429,9 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
{ {
int val = 1; int val = 1;
XChangeProperty( display, data->whole_window, x11drv_atom(KWM_DOCKWINDOW), XChangeProperty( display, data->whole_window, x11drv_atom(KWM_DOCKWINDOW),
x11drv_atom(KWM_DOCKWINDOW), 32, PropModeReplace, (char*)&val, 1 ); x11drv_atom(KWM_DOCKWINDOW), 32, PropModeReplace, (unsigned char*)&val, 1 );
XChangeProperty( display, data->whole_window, x11drv_atom(_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR), XChangeProperty( display, data->whole_window, x11drv_atom(_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR),
XA_WINDOW, 32, PropModeReplace, (char*)&data->whole_window, 1 ); XA_WINDOW, 32, PropModeReplace, (unsigned char*)&data->whole_window, 1 );
} }
/* set the WM_CLIENT_MACHINE and WM_LOCALE_NAME properties */ /* set the WM_CLIENT_MACHINE and WM_LOCALE_NAME properties */
...@@ -439,14 +439,14 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) ...@@ -439,14 +439,14 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
/* set the pid. together, these properties are needed so the window manager can kill us if we freeze */ /* set the pid. together, these properties are needed so the window manager can kill us if we freeze */
i = getpid(); i = getpid();
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_PID), XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_PID),
XA_CARDINAL, 32, PropModeReplace, (char *)&i, 1); XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&i, 1);
/* map WS_EX_TOOLWINDOW to _NET_WM_WINDOW_TYPE_UTILITY */ /* map WS_EX_TOOLWINDOW to _NET_WM_WINDOW_TYPE_UTILITY */
if (ex_style & WS_EX_TOOLWINDOW) if (ex_style & WS_EX_TOOLWINDOW)
{ {
Atom a = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY); Atom a = x11drv_atom(_NET_WM_WINDOW_TYPE_UTILITY);
XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE), XChangeProperty(display, data->whole_window, x11drv_atom(_NET_WM_WINDOW_TYPE),
XA_ATOM, 32, PropModeReplace, (char*)&a, 1); XA_ATOM, 32, PropModeReplace, (unsigned char*)&a, 1);
} }
mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; mwm_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
...@@ -473,7 +473,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) ...@@ -473,7 +473,7 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
XChangeProperty( display, data->whole_window, x11drv_atom(_MOTIF_WM_HINTS), XChangeProperty( display, data->whole_window, x11drv_atom(_MOTIF_WM_HINTS),
x11drv_atom(_MOTIF_WM_HINTS), 32, PropModeReplace, x11drv_atom(_MOTIF_WM_HINTS), 32, PropModeReplace,
(char*)&mwm_hints, sizeof(mwm_hints)/sizeof(long) ); (unsigned char*)&mwm_hints, sizeof(mwm_hints)/sizeof(long) );
XChangeProperty( display, data->whole_window, x11drv_atom(XdndAware), XChangeProperty( display, data->whole_window, x11drv_atom(XdndAware),
XA_ATOM, 32, PropModeReplace, (unsigned char*)&dndVersion, 1 ); XA_ATOM, 32, PropModeReplace, (unsigned char*)&dndVersion, 1 );
......
...@@ -1482,6 +1482,7 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG ...@@ -1482,6 +1482,7 @@ static LONG start_size_move( HWND hwnd, WPARAM wParam, POINT *capturePoint, LONG
} }
else /* SC_SIZE */ else /* SC_SIZE */
{ {
pt.x = pt.y = 0;
while(!hittest) while(!hittest)
{ {
GetMessageW( &msg, 0, WM_KEYFIRST, WM_MOUSELAST ); GetMessageW( &msg, 0, WM_KEYFIRST, WM_MOUSELAST );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment