Merge branch 'win32-enable-werror' into 'master'

Win32 enable werror

See merge request GNOME/gtk!861
This commit is contained in:
Benjamin Otte 2019-05-21 14:39:53 +00:00
commit 9f739ab135
10 changed files with 17 additions and 35 deletions

View File

@ -42,10 +42,11 @@ ccache --zero-stats
ccache --show-stats
export CCACHE_DISABLE=true
meson \
-Denable-x11-backend=false \
-Denable-wayland-backend=false \
-Denable-win32-backend=true \
-Dx11-backend=false \
-Dwayland-backend=false \
-Dwin32-backend=true \
-Dvulkan=no \
--werror \
_build
unset CCACHE_DISABLE

View File

@ -1733,7 +1733,7 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface,
GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n"));
gdk_device_get_position (device, &px, &px);
gdk_device_get_position (device, &px, &py);
x_root = round (px) + dx;
y_root = round (py) + dy;

View File

@ -144,20 +144,6 @@ typedef LONG
#define MONITORINFOF_PRIMARY 1
#endif
/* MinGW-w64 does not have a prototype for function in its headers
* at the moment of writing.
*/
#if !defined (HAVE_SETUP_DI_GET_DEVICE_PROPERTY_W)
BOOL WINAPI SetupDiGetDevicePropertyW (HDEVINFO DeviceInfoSet,
PSP_DEVINFO_DATA DeviceInfoData,
const DEVPROPKEY *PropertyKey,
DEVPROPTYPE *PropertyType,
PBYTE PropertyBuffer,
DWORD PropertyBufferSize,
PDWORD RequiredSize,
DWORD Flags);
#endif
#define G_GUID_FORMAT "%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X"
#define g_format_guid(guid) (guid)->Data1, \
(guid)->Data2, \

View File

@ -55,7 +55,6 @@ static void gdk_surface_impl_win32_finalize (GObject *object);
static gpointer parent_class = NULL;
static GSList *modal_window_stack = NULL;
static const cairo_user_data_key_t gdk_win32_cairo_key;
typedef struct _FullscreenInfo FullscreenInfo;
struct _FullscreenInfo
@ -746,7 +745,6 @@ gdk_win32_surface_destroy (GdkSurface *window,
gboolean foreign_destroy)
{
GdkSurfaceImplWin32 *surface_impl = GDK_SURFACE_IMPL_WIN32 (window->impl);
GSList *tmp;
g_return_if_fail (GDK_IS_SURFACE (window));

View File

@ -664,7 +664,6 @@ gtk_im_context_ime_focus_in (GtkIMContext *context)
{
GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (context);
GdkSurface *toplevel;
GtkWidget *widget = NULL;
HWND hwnd;
HIMC himc;
@ -721,7 +720,6 @@ gtk_im_context_ime_focus_out (GtkIMContext *context)
{
GtkIMContextIME *context_ime = GTK_IM_CONTEXT_IME (context);
GdkSurface *toplevel;
GtkWidget *widget = NULL;
HWND hwnd;
HIMC himc;
@ -881,7 +879,7 @@ gtk_im_context_ime_set_preedit_font (GtkIMContext *context)
widget = gtk_root_get_for_surface (context_ime->client_surface);
if (!widget)
return
return;
hwnd = gdk_win32_surface_get_impl_hwnd (context_ime->client_surface);
himc = ImmGetContext (hwnd);

View File

@ -419,7 +419,6 @@ enum_locale_proc (LPTSTR locale)
SUBLANGID (LANGIDFROMLCID (lcid)) == SUBLANG_DEFAULT)))
{
char language[100], country[100];
char locale[300];
if (script_to_check != NULL)
{
@ -467,11 +466,13 @@ enum_locale_proc (LPTSTR locale)
if (GetLocaleInfo (lcid, LOCALE_SENGLANGUAGE, language, sizeof (language)) &&
GetLocaleInfo (lcid, LOCALE_SENGCOUNTRY, country, sizeof (country)))
{
strcpy (locale, language);
strcat (locale, "_");
strcat (locale, country);
char str[300];
if (setlocale (LC_ALL, locale) != NULL)
strcpy (str, language);
strcat (str, "_");
strcat (str, country);
if (setlocale (LC_ALL, str) != NULL)
setlocale_called = TRUE;
}

View File

@ -1211,6 +1211,7 @@ dialog_from_print_settings (GtkPrintOperation *op,
switch (print_pages)
{
default:
case GTK_PRINT_PAGES_SELECTION:
case GTK_PRINT_PAGES_ALL:
printdlgex->Flags |= PD_ALLPAGES;
break;

View File

@ -8446,7 +8446,6 @@ gtk_window_set_display (GtkWindow *window,
{
GtkWindowPrivate *priv = gtk_window_get_instance_private (window);
GtkWidget *widget;
GdkDisplay *previous_display;
gboolean was_mapped;
g_return_if_fail (GTK_IS_WINDOW (window));
@ -8460,8 +8459,6 @@ gtk_window_set_display (GtkWindow *window,
widget = GTK_WIDGET (window);
previous_display = priv->display;
was_mapped = _gtk_widget_get_mapped (widget);
if (was_mapped)
@ -8473,14 +8470,14 @@ gtk_window_set_display (GtkWindow *window,
gtk_window_set_transient_for (window, NULL);
gtk_window_free_key_hash (window);
priv->display = display;
#ifdef GDK_WINDOWING_X11
g_signal_handlers_disconnect_by_func (gtk_settings_get_for_display (previous_display),
g_signal_handlers_disconnect_by_func (gtk_settings_get_for_display (priv->display),
gtk_window_on_theme_variant_changed, window);
g_signal_connect (gtk_settings_get_for_display (display),
"notify::gtk-application-prefer-dark-theme",
G_CALLBACK (gtk_window_on_theme_variant_changed), window);
#endif
priv->display = display;
gtk_widget_unroot (widget);
gtk_widget_root (widget);

View File

@ -22,7 +22,7 @@ deserialize_error_func (const GtkCssSection *section,
g_warning ("Error at %s: %s", section_str, error->message);
free (section_str);
g_free (section_str);
}

View File

@ -117,7 +117,7 @@ deserialize_error_func (const GtkCssSection *section,
g_warning ("Error at %s: %s", section_str, error->message);
free (section_str);
g_free (section_str);
}
int