forked from AuroraMiddleware/gtk
build: Don't turn off critical warnings
-Wint-conversion is important because it checks casts from ints to pointers. -Wdiscarded-qualifiers is important to catch cases where we don't strings when we should.
This commit is contained in:
parent
defcf17d3d
commit
c1e9869329
@ -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;
|
||||
|
||||
|
@ -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" },
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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++)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user