mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
Merge branch 'matthiasc/for-main' into 'main'
gsk: Add an assertion to help static analysis See merge request GNOME/gtk!5224
This commit is contained in:
commit
dfbaeefc64
@ -141,7 +141,7 @@ gdk_load_jpeg (GBytes *input_bytes,
|
||||
struct jpeg_decompress_struct info;
|
||||
struct error_handler_data jerr;
|
||||
guint width, height, stride;
|
||||
unsigned char *data;
|
||||
unsigned char *data = NULL;
|
||||
unsigned char *row[1];
|
||||
GBytes *bytes;
|
||||
GdkTexture *texture;
|
||||
@ -155,6 +155,7 @@ gdk_load_jpeg (GBytes *input_bytes,
|
||||
|
||||
if (sigsetjmp (jerr.setjmp_buffer, 1))
|
||||
{
|
||||
g_free (data);
|
||||
jpeg_destroy_decompress (&info);
|
||||
return NULL;
|
||||
}
|
||||
@ -247,7 +248,7 @@ gdk_save_jpeg (GdkTexture *texture)
|
||||
struct jpeg_compress_struct info;
|
||||
struct error_handler_data jerr;
|
||||
struct jpeg_error_mgr err;
|
||||
guchar *data;
|
||||
guchar *data = NULL;
|
||||
gulong size = 0;
|
||||
guchar *input = NULL;
|
||||
GdkMemoryTexture *memtex = NULL;
|
||||
|
@ -4818,6 +4818,8 @@ blur_image_surface (cairo_surface_t *surface, int radius, int iterations)
|
||||
cairo_surface_t *tmp;
|
||||
int width, height;
|
||||
|
||||
g_assert (radius >= 0);
|
||||
|
||||
width = cairo_image_surface_get_width (surface);
|
||||
height = cairo_image_surface_get_height (surface);
|
||||
tmp = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
||||
|
@ -963,6 +963,7 @@ parser_get_compose_table (GtkComposeParser *parser)
|
||||
if (char_data->len >= 0x8000)
|
||||
{
|
||||
g_warning ("GTK can't handle compose tables this large (%s)", parser->compose_file ? parser->compose_file : "");
|
||||
g_free (data);
|
||||
g_string_free (char_data, TRUE);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -86,14 +86,20 @@ gtk_string_sorter_get_key (GtkExpression *expression,
|
||||
switch (collation)
|
||||
{
|
||||
case GTK_COLLATION_NONE:
|
||||
key = s;
|
||||
if (ignore_case)
|
||||
key = g_steal_pointer (&s);
|
||||
else
|
||||
key = g_strdup (s);
|
||||
break;
|
||||
|
||||
case GTK_COLLATION_UNICODE:
|
||||
key = g_utf8_collate_key (s, -1);
|
||||
break;
|
||||
|
||||
case GTK_COLLATION_FILENAME:
|
||||
key = g_utf8_collate_key_for_filename (s, -1);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user