Re: Release v1.5.1 build warning
authorColin Clark <colin.clark@cclark.uk>
Sun, 1 Sep 2019 11:57:11 +0000 (12:57 +0100)
committerColin Clark <colin.clark@cclark.uk>
Sun, 1 Sep 2019 11:57:11 +0000 (12:57 +0100)
https://www.freelists.org/post/geeqie/Release-v151,2

layout_image.c:398:9: error: suggest parentheses around assignment used
as truth value [-Werror=parentheses]

src/layout_image.c

index 60bdd5a..ee26fd4 100644 (file)
@@ -395,11 +395,9 @@ static void animation_async_ready_cb(GObject *source_object, GAsyncResult *res,
                        {
                        if (!gdk_pixbuf_animation_is_static_image(animation->gpa))
                                {
-                               if (animation->iter = gdk_pixbuf_animation_get_iter(animation->gpa,NULL))
+                               animation->iter = gdk_pixbuf_animation_get_iter(animation->gpa, NULL);
+                               if (animation->iter)
                                        {
-                                       animation->iter = gdk_pixbuf_animation_get_iter(animation->gpa, NULL);
-                                       // FIXME: the reference count is being incremented here. Reason unknown.
-                                       g_object_unref(animation->gpa);
                                        animation->data_adr = animation->lw->image->image_fd;
                                        animation->delay = gdk_pixbuf_animation_iter_get_delay_time(animation->iter);
                                        animation->valid = TRUE;