[libadwaita/wip/exalm/11rc: 2/3] carousel-indicator-dots: Silence a warning




commit ec3f85c9678514df22898f338e75dd03321a8319
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sun Mar 6 23:28:23 2022 +0400

    carousel-indicator-dots: Silence a warning
    
    It's not really a problem, as if the carousel is not set n_points will be 0,
    but the compiler doesn't like this.

 src/adw-carousel-indicator-dots.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/adw-carousel-indicator-dots.c b/src/adw-carousel-indicator-dots.c
index 15436070..b7be0c1f 100644
--- a/src/adw-carousel-indicator-dots.c
+++ b/src/adw-carousel-indicator-dots.c
@@ -193,7 +193,7 @@ adw_carousel_indicator_dots_measure (GtkWidget      *widget,
   if (orientation == self->orientation) {
     int i, n_points = 0;
     double indicator_length, dot_size;
-    double *points, *sizes;
+    double *points = NULL, *sizes;
 
     if (self->carousel)
       points = adw_swipeable_get_snap_points (ADW_SWIPEABLE (self->carousel), &n_points);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]