diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index 3d5f29b289..5d9cafe3ea 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -901,10 +901,10 @@ map_named_shm (char *name, gsize size) #endif } -static char * -parse_line (char *line, char *key) +static const char * +parse_line (const char *line, const char *key) { - char *p; + const char *p; if (!g_str_has_prefix (line, key)) return NULL; @@ -970,15 +970,15 @@ static void start_input (HttpRequest *request) { char **lines; - char *p; + const char *p; int i; char *res; - char *origin, *host; + const char *origin, *host; BroadwayInput *input; const void *data_buffer; gsize data_buffer_size; GInputStream *in; - char *key; + const char *key; GSocket *socket; int flag = 1; diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c index b190c55dc7..8e96d6e0e5 100644 --- a/gdk/broadway/broadwayd.c +++ b/gdk/broadway/broadwayd.c @@ -421,7 +421,7 @@ main (int argc, char *argv[]) int http_port = 0; char *ssl_cert = NULL; char *ssl_key = NULL; - char *display; + const char *display; int port = 0; const GOptionEntry entries[] = { { "port", 'p', 0, G_OPTION_ARG_INT, &http_port, "Httpd port", "PORT" }, diff --git a/gdk/wayland/wm-button-layout-translation.c b/gdk/wayland/wm-button-layout-translation.c index fc33ec14d5..64ff93e496 100644 --- a/gdk/wayland/wm-button-layout-translation.c +++ b/gdk/wayland/wm-button-layout-translation.c @@ -35,7 +35,7 @@ translate_buttons (char *layout, int *len_p) while ((button = strsep (&strp, ","))) { - char *gtkbutton; + const char *gtkbutton; if (strcmp (button, "menu") == 0) gtkbutton = "icon"; diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c index fa1cfde2ec..704ad24409 100644 --- a/gdk/x11/gdkxftdefaults.c +++ b/gdk/x11/gdkxftdefaults.c @@ -81,9 +81,9 @@ parse_boolean (char *v) } static gboolean -get_boolean_default (Display *dpy, - gchar *option, - gboolean *value) +get_boolean_default (Display *dpy, + const gchar *option, + gboolean *value) { gchar *v; gint i; @@ -103,9 +103,9 @@ get_boolean_default (Display *dpy, } static gboolean -get_double_default (Display *dpy, - gchar *option, - gdouble *value) +get_double_default (Display *dpy, + const gchar *option, + gdouble *value) { gchar *v, *e; @@ -126,9 +126,9 @@ get_double_default (Display *dpy, } static gboolean -get_integer_default (Display *dpy, - gchar *option, - gint *value) +get_integer_default (Display *dpy, + const gchar *option, + gint *value) { gchar *v, *e; diff --git a/gdk/x11/xsettings-client.c b/gdk/x11/xsettings-client.c index 3c55ef114d..44aa4debd5 100644 --- a/gdk/x11/xsettings-client.c +++ b/gdk/x11/xsettings-client.c @@ -458,7 +458,7 @@ read_settings (GdkX11Screen *x11_screen, g_value_init (copy, G_VALUE_TYPE (setting)); g_value_copy (setting, copy); g_hash_table_insert (x11_screen->xsettings, - "gtk-xft-dpi", copy); + (gpointer) "gtk-xft-dpi", copy); } } diff --git a/gsk/gskvulkanrenderpass.c b/gsk/gskvulkanrenderpass.c index 770ebdb5e4..34cb9997dd 100644 --- a/gsk/gskvulkanrenderpass.c +++ b/gsk/gskvulkanrenderpass.c @@ -662,13 +662,13 @@ gsk_vulkan_render_pass_add (GskVulkanRenderPass *self, } static GskVulkanImage * -gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass *self, - GskVulkanRender *render, - GskVulkanUploader *uploader, - GskRenderNode *node, - graphene_rect_t *bounds, - GskVulkanClip *current_clip, - graphene_rect_t *tex_rect) +gsk_vulkan_render_pass_get_node_as_texture (GskVulkanRenderPass *self, + GskVulkanRender *render, + GskVulkanUploader *uploader, + GskRenderNode *node, + const graphene_rect_t *bounds, + GskVulkanClip *current_clip, + graphene_rect_t *tex_rect) { GskVulkanImage *result; cairo_surface_t *surface; @@ -889,7 +889,7 @@ gsk_vulkan_render_pass_upload (GskVulkanRenderPass *self, { GskVulkanOp *op; guint i; - const GskVulkanClip *clip = NULL; + GskVulkanClip *clip = NULL; for (i = 0; i < self->render_ops->len; i++) { diff --git a/gtk/a11y/gtkaccessibilityutil.c b/gtk/a11y/gtkaccessibilityutil.c index 926e390cbc..48d6b4b283 100644 --- a/gtk/a11y/gtkaccessibilityutil.c +++ b/gtk/a11y/gtkaccessibilityutil.c @@ -136,7 +136,7 @@ atk_key_event_from_gdk_event_key (GdkEventKey *key, if (string && string[0] && (state & GDK_CONTROL_MASK || g_unichar_isgraph (g_utf8_get_char (string)))) - event->string = string; + event->string = (char *) string; else event->string = gdk_keyval_name (keyval); diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c index 76a9737d54..df13372566 100644 --- a/gtk/gtkiconview.c +++ b/gtk/gtkiconview.c @@ -2270,7 +2270,7 @@ gtk_icon_view_button_press (GtkGestureMultiPress *gesture, } static gboolean -button_event_modifies_selection (GdkEventButton *event) +button_event_modifies_selection (const GdkEventButton *event) { guint state; diff --git a/gtk/inspector/recorder.c b/gtk/inspector/recorder.c index 3c09608317..78b0d73763 100644 --- a/gtk/inspector/recorder.c +++ b/gtk/inspector/recorder.c @@ -208,7 +208,7 @@ get_color_surface (const GdkRGBA *color) } static cairo_surface_t * -get_linear_gradient_surface (gsize n_stops, GskColorStop *stops) +get_linear_gradient_surface (gsize n_stops, const GskColorStop *stops) { cairo_surface_t *surface; cairo_t *cr; diff --git a/meson.build b/meson.build index 0e0b66970e..cc449733e1 100644 --- a/meson.build +++ b/meson.build @@ -249,8 +249,6 @@ elif cc.get_id() == 'gcc' or cc.get_id() == 'clang' '-Wlogical-op', '-Wno-uninitialized', '-Wno-shadow', - '-Wno-int-conversion', - '-Wno-discarded-qualifiers', '-Werror=redundant-decls', '-Werror=implicit', '-Werror=nonnull',