mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 14:31:10 +00:00
Merge branch 'wip/otte/for-master' into 'master'
Fix a bunch of issues found by static analyzer See merge request GNOME/gtk!4090
This commit is contained in:
commit
a07e1bf336
@ -874,8 +874,8 @@ gtk_gears_tick (GtkWidget *widget,
|
||||
{
|
||||
GtkGears *gears = GTK_GEARS (widget);
|
||||
GtkGearsPrivate *priv = gtk_gears_get_instance_private (gears);
|
||||
GdkFrameTimings *timings, *previous_timings;
|
||||
gint64 previous_frame_time = 0;
|
||||
GdkFrameTimings *previous_timings;
|
||||
gint64 previous_frame_time;
|
||||
gint64 frame_time;
|
||||
gint64 history_start, history_len;
|
||||
gint64 frame;
|
||||
@ -915,12 +915,6 @@ gtk_gears_tick (GtkWidget *widget,
|
||||
}
|
||||
}
|
||||
|
||||
timings = gdk_frame_clock_get_current_timings (frame_clock);
|
||||
previous_timings = gdk_frame_clock_get_timings (frame_clock,
|
||||
gdk_frame_timings_get_frame_counter (timings) - 1);
|
||||
if (previous_timings != NULL)
|
||||
previous_frame_time = gdk_frame_timings_get_frame_time (previous_timings);
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
|
@ -385,6 +385,8 @@ gdk_save_png (GdkTexture *texture)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memtex = gdk_memory_texture_from_texture (texture, format);
|
||||
|
||||
if (sigsetjmp (png_jmpbuf (png), 1))
|
||||
{
|
||||
g_object_unref (memtex);
|
||||
@ -393,8 +395,6 @@ gdk_save_png (GdkTexture *texture)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
memtex = gdk_memory_texture_from_texture (texture, format);
|
||||
|
||||
png_set_write_fn (png, &io, png_write_func, png_flush_func);
|
||||
|
||||
png_set_IHDR (png, info, width, height, depth,
|
||||
|
@ -393,10 +393,11 @@ gdk_load_tiff (GBytes *input_bytes,
|
||||
guint16 extra;
|
||||
guint16 *extra_types;
|
||||
|
||||
if (!TIFFGetField (tif, TIFFTAG_EXTRASAMPLES, &extra, &extra_types))
|
||||
if (TIFFGetField (tif, TIFFTAG_EXTRASAMPLES, &extra, &extra_types))
|
||||
alpha_samples = extra_types[0];
|
||||
else
|
||||
alpha_samples = 0;
|
||||
|
||||
alpha_samples = extra_types[0];
|
||||
if (alpha_samples != 0 && alpha_samples != EXTRASAMPLE_ASSOCALPHA && alpha_samples != EXTRASAMPLE_UNASSALPHA)
|
||||
{
|
||||
texture = load_fallback (tif, error);
|
||||
|
@ -220,8 +220,6 @@ gdk_x11_gl_context_glx_make_current (GdkGLContext *context,
|
||||
GdkSurface *surface;
|
||||
GLXWindow drawable;
|
||||
|
||||
drawable = gdk_x11_gl_context_glx_get_drawable (self);
|
||||
|
||||
if (!surfaceless)
|
||||
surface = gdk_gl_context_get_surface (context);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user