[libhandy] carousel-box: Initialize lower and upper variables
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy] carousel-box: Initialize lower and upper variables
- Date: Tue, 16 Feb 2021 07:46:06 +0000 (UTC)
commit f11fcbcf86c7d3c3c3688967af9d5bc7f96ab320
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Feb 16 03:29:57 2021 +0500
carousel-box: Initialize lower and upper variables
Fix warnings with --buildtype=optimized.
src/hdy-carousel-box.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/hdy-carousel-box.c b/src/hdy-carousel-box.c
index af4dbd20..df279ea4 100644
--- a/src/hdy-carousel-box.c
+++ b/src/hdy-carousel-box.c
@@ -418,7 +418,7 @@ static void
set_position (HdyCarouselBox *self,
gdouble position)
{
- gdouble lower, upper;
+ gdouble lower = 0, upper = 0;
hdy_carousel_box_get_range (self, &lower, &upper);
@@ -1741,6 +1741,9 @@ hdy_carousel_box_get_page_at_position (HdyCarouselBox *self,
g_return_val_if_fail (HDY_IS_CAROUSEL_BOX (self), NULL);
+ lower = 0;
+ upper = 0;
+
hdy_carousel_box_get_range (self, &lower, &upper);
position = CLAMP (position, lower, upper);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]