[libadwaita] Use G_GNUC_WARN_UNUSED_RESULT in prototypes
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita] Use G_GNUC_WARN_UNUSED_RESULT in prototypes
- Date: Thu, 27 May 2021 09:06:31 +0000 (UTC)
commit 065c00a9871bcad446ac667bdc6aa8ad725c95bd
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu May 27 10:00:45 2021 +0200
Use G_GNUC_WARN_UNUSED_RESULT in prototypes
This will warn users of the C API (and ourselves) in case we mistakenly
ignore a returned value that transfers a resource to the caller.
Fixes https://gitlab.gnome.org/GNOME/libadwaita/-/issues/127
src/adw-action-row.h | 2 +-
src/adw-animation-private.h | 2 +-
src/adw-application-window.h | 2 +-
src/adw-avatar.h | 4 ++--
src/adw-bin.h | 2 +-
src/adw-carousel-indicator-dots.h | 2 +-
src/adw-carousel-indicator-lines.h | 2 +-
src/adw-carousel.h | 2 +-
src/adw-clamp-layout.h | 2 +-
src/adw-clamp-scrollable.h | 2 +-
src/adw-clamp.h | 2 +-
src/adw-combo-row.h | 2 +-
src/adw-enum-list-model.h | 2 +-
src/adw-enum-value-object-private.h | 2 +-
src/adw-expander-row.h | 2 +-
src/adw-flap.h | 2 +-
src/adw-gizmo-private.h | 2 +-
src/adw-header-bar.h | 2 +-
src/adw-indicator-bin-private.h | 2 +-
src/adw-leaflet.h | 4 ++--
src/adw-preferences-group-private.h | 2 +-
src/adw-preferences-group.h | 2 +-
src/adw-preferences-page-private.h | 2 +-
src/adw-preferences-page.h | 2 +-
src/adw-preferences-row.h | 2 +-
src/adw-preferences-window.h | 2 +-
src/adw-shadow-helper-private.h | 2 +-
src/adw-squeezer.h | 4 ++--
src/adw-status-page.h | 2 +-
src/adw-swipe-tracker.h | 2 +-
src/adw-swipeable.h | 2 +-
src/adw-tab-bar.h | 2 +-
src/adw-tab-private.h | 2 +-
src/adw-tab-view-private.h | 2 +-
src/adw-tab-view.h | 4 ++--
src/adw-value-object.h | 10 +++++-----
src/adw-view-switcher-bar.h | 2 +-
src/adw-view-switcher-button-private.h | 2 +-
src/adw-view-switcher-title.h | 2 +-
src/adw-view-switcher.h | 2 +-
src/adw-window-mixin-private.h | 2 +-
src/adw-window-title.h | 2 +-
src/adw-window.h | 2 +-
43 files changed, 51 insertions(+), 51 deletions(-)
---
diff --git a/src/adw-action-row.h b/src/adw-action-row.h
index 5ba489af..627db293 100644
--- a/src/adw-action-row.h
+++ b/src/adw-action-row.h
@@ -37,7 +37,7 @@ struct _AdwActionRowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_action_row_new (void);
+GtkWidget *adw_action_row_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_action_row_get_subtitle (AdwActionRow *self);
diff --git a/src/adw-animation-private.h b/src/adw-animation-private.h
index d66c555e..0a1c1ecc 100644
--- a/src/adw-animation-private.h
+++ b/src/adw-animation-private.h
@@ -32,7 +32,7 @@ AdwAnimation *adw_animation_new (GtkWidget *widget,
AdwAnimationEasingFunc easing_func,
AdwAnimationValueCallback value_cb,
AdwAnimationDoneCallback done_cb,
- gpointer user_data);
+ gpointer user_data) G_GNUC_WARN_UNUSED_RESULT;
AdwAnimation *adw_animation_ref (AdwAnimation *self);
void adw_animation_unref (AdwAnimation *self);
diff --git a/src/adw-application-window.h b/src/adw-application-window.h
index c18414b5..ad0b8a94 100644
--- a/src/adw-application-window.h
+++ b/src/adw-application-window.h
@@ -30,7 +30,7 @@ struct _AdwApplicationWindowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_application_window_new (GtkApplication *app);
+GtkWidget *adw_application_window_new (GtkApplication *app) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
void adw_application_window_set_child (AdwApplicationWindow *self,
diff --git a/src/adw-avatar.h b/src/adw-avatar.h
index 057e3514..db541cda 100644
--- a/src/adw-avatar.h
+++ b/src/adw-avatar.h
@@ -25,7 +25,7 @@ G_DECLARE_FINAL_TYPE (AdwAvatar, adw_avatar, ADW, AVATAR, GtkWidget)
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_avatar_new (int size,
const char *text,
- gboolean show_initials);
+ gboolean show_initials) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_avatar_get_icon_name (AdwAvatar *self);
@@ -60,6 +60,6 @@ void adw_avatar_set_size (AdwAvatar *self,
ADW_AVAILABLE_IN_ALL
GdkPixbuf *adw_avatar_draw_to_pixbuf (AdwAvatar *self,
int size,
- int scale_factor);
+ int scale_factor) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-bin.h b/src/adw-bin.h
index c8cc6c1f..988de789 100644
--- a/src/adw-bin.h
+++ b/src/adw-bin.h
@@ -29,7 +29,7 @@ struct _AdwBinClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_bin_new (void);
+GtkWidget *adw_bin_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_bin_get_child (AdwBin *self);
diff --git a/src/adw-carousel-indicator-dots.h b/src/adw-carousel-indicator-dots.h
index 4a941889..28774cc2 100644
--- a/src/adw-carousel-indicator-dots.h
+++ b/src/adw-carousel-indicator-dots.h
@@ -23,7 +23,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwCarouselIndicatorDots, adw_carousel_indicator_dots, ADW, CAROUSEL_INDICATOR_DOTS,
GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_carousel_indicator_dots_new (void);
+GtkWidget *adw_carousel_indicator_dots_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwCarousel *adw_carousel_indicator_dots_get_carousel (AdwCarouselIndicatorDots *self);
diff --git a/src/adw-carousel-indicator-lines.h b/src/adw-carousel-indicator-lines.h
index b44e313f..6bd8fd1c 100644
--- a/src/adw-carousel-indicator-lines.h
+++ b/src/adw-carousel-indicator-lines.h
@@ -23,7 +23,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwCarouselIndicatorLines, adw_carousel_indicator_lines, ADW,
CAROUSEL_INDICATOR_LINES, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_carousel_indicator_lines_new (void);
+GtkWidget *adw_carousel_indicator_lines_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwCarousel *adw_carousel_indicator_lines_get_carousel (AdwCarouselIndicatorLines *self);
diff --git a/src/adw-carousel.h b/src/adw-carousel.h
index 6dcaa9ba..2f791c62 100644
--- a/src/adw-carousel.h
+++ b/src/adw-carousel.h
@@ -22,7 +22,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwCarousel, adw_carousel, ADW, CAROUSEL, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_carousel_new (void);
+GtkWidget *adw_carousel_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
void adw_carousel_prepend (AdwCarousel *self,
diff --git a/src/adw-clamp-layout.h b/src/adw-clamp-layout.h
index 34c532d3..d17ea641 100644
--- a/src/adw-clamp-layout.h
+++ b/src/adw-clamp-layout.h
@@ -22,7 +22,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwClampLayout, adw_clamp_layout, ADW, CLAMP_LAYOUT, GtkLayoutManager)
ADW_AVAILABLE_IN_ALL
-GtkLayoutManager *adw_clamp_layout_new (void);
+GtkLayoutManager *adw_clamp_layout_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
int adw_clamp_layout_get_maximum_size (AdwClampLayout *self);
diff --git a/src/adw-clamp-scrollable.h b/src/adw-clamp-scrollable.h
index ab406e70..17045a92 100644
--- a/src/adw-clamp-scrollable.h
+++ b/src/adw-clamp-scrollable.h
@@ -22,7 +22,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwClampScrollable, adw_clamp_scrollable, ADW, CLAMP_SCROLLABLE, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_clamp_scrollable_new (void);
+GtkWidget *adw_clamp_scrollable_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_clamp_scrollable_get_child (AdwClampScrollable *self);
diff --git a/src/adw-clamp.h b/src/adw-clamp.h
index 45d3f2c1..b7187bcc 100644
--- a/src/adw-clamp.h
+++ b/src/adw-clamp.h
@@ -22,7 +22,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwClamp, adw_clamp, ADW, CLAMP, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_clamp_new (void);
+GtkWidget *adw_clamp_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_clamp_get_child (AdwClamp *self);
diff --git a/src/adw-combo-row.h b/src/adw-combo-row.h
index 3b29df16..ba0284c8 100644
--- a/src/adw-combo-row.h
+++ b/src/adw-combo-row.h
@@ -36,7 +36,7 @@ struct _AdwComboRowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_combo_row_new (void);
+GtkWidget *adw_combo_row_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GListModel *adw_combo_row_get_model (AdwComboRow *self);
diff --git a/src/adw-enum-list-model.h b/src/adw-enum-list-model.h
index 84bf669c..5d998b84 100644
--- a/src/adw-enum-list-model.h
+++ b/src/adw-enum-list-model.h
@@ -23,7 +23,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwEnumListModel, adw_enum_list_model, ADW, ENUM_LIST_MODEL, GObject)
ADW_AVAILABLE_IN_ALL
-AdwEnumListModel *adw_enum_list_model_new (GType enum_type);
+AdwEnumListModel *adw_enum_list_model_new (GType enum_type) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GType adw_enum_list_model_get_enum_type (AdwEnumListModel *self);
diff --git a/src/adw-enum-value-object-private.h b/src/adw-enum-value-object-private.h
index a6e54527..50ee5ab9 100644
--- a/src/adw-enum-value-object-private.h
+++ b/src/adw-enum-value-object-private.h
@@ -14,6 +14,6 @@
G_BEGIN_DECLS
-AdwEnumValueObject *adw_enum_value_object_new (GEnumValue *enum_value);
+AdwEnumValueObject *adw_enum_value_object_new (GEnumValue *enum_value) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-expander-row.h b/src/adw-expander-row.h
index 372ac3ee..34ad2389 100644
--- a/src/adw-expander-row.h
+++ b/src/adw-expander-row.h
@@ -35,7 +35,7 @@ struct _AdwExpanderRowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_expander_row_new (void);
+GtkWidget *adw_expander_row_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_expander_row_get_subtitle (AdwExpanderRow *self);
diff --git a/src/adw-flap.h b/src/adw-flap.h
index 69cb7cf0..db8d28bd 100644
--- a/src/adw-flap.h
+++ b/src/adw-flap.h
@@ -35,7 +35,7 @@ typedef enum {
} AdwFlapTransitionType;
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_flap_new (void);
+GtkWidget *adw_flap_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_flap_get_content (AdwFlap *self);
diff --git a/src/adw-gizmo-private.h b/src/adw-gizmo-private.h
index 7afdec94..95c9758d 100644
--- a/src/adw-gizmo-private.h
+++ b/src/adw-gizmo-private.h
@@ -47,6 +47,6 @@ GtkWidget *adw_gizmo_new (const char *css_name,
AdwGizmoSnapshotFunc snapshot_func,
AdwGizmoContainsFunc contains_func,
AdwGizmoFocusFunc focus_func,
- AdwGizmoGrabFocusFunc grab_focus_func);
+ AdwGizmoGrabFocusFunc grab_focus_func) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-header-bar.h b/src/adw-header-bar.h
index a6355062..d3d09991 100644
--- a/src/adw-header-bar.h
+++ b/src/adw-header-bar.h
@@ -42,7 +42,7 @@ typedef enum {
} AdwCenteringPolicy;
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_header_bar_new (void);
+GtkWidget *adw_header_bar_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_header_bar_get_title_widget (AdwHeaderBar *self);
diff --git a/src/adw-indicator-bin-private.h b/src/adw-indicator-bin-private.h
index 6904547b..8336b381 100644
--- a/src/adw-indicator-bin-private.h
+++ b/src/adw-indicator-bin-private.h
@@ -20,7 +20,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (AdwIndicatorBin, adw_indicator_bin, ADW, INDICATOR_BIN, GtkWidget)
-GtkWidget *adw_indicator_bin_new (void);
+GtkWidget *adw_indicator_bin_new (void) G_GNUC_WARN_UNUSED_RESULT;
GtkWidget *adw_indicator_bin_get_child (AdwIndicatorBin *self);
void adw_indicator_bin_set_child (AdwIndicatorBin *self,
diff --git a/src/adw-leaflet.h b/src/adw-leaflet.h
index d117a937..c6fdad78 100644
--- a/src/adw-leaflet.h
+++ b/src/adw-leaflet.h
@@ -50,7 +50,7 @@ typedef enum {
} AdwLeafletTransitionType;
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_leaflet_new (void);
+GtkWidget *adw_leaflet_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwLeafletPage *adw_leaflet_append (AdwLeaflet *self,
@@ -158,6 +158,6 @@ void adw_leaflet_set_can_unfold (AdwLeaflet *self,
gboolean can_unfold);
ADW_AVAILABLE_IN_ALL
-GtkSelectionModel *adw_leaflet_get_pages (AdwLeaflet *self);
+GtkSelectionModel *adw_leaflet_get_pages (AdwLeaflet *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-preferences-group-private.h b/src/adw-preferences-group-private.h
index 0599b790..fa9f2eca 100644
--- a/src/adw-preferences-group-private.h
+++ b/src/adw-preferences-group-private.h
@@ -10,6 +10,6 @@
G_BEGIN_DECLS
-GListModel *adw_preferences_group_get_rows (AdwPreferencesGroup *self);
+GListModel *adw_preferences_group_get_rows (AdwPreferencesGroup *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-preferences-group.h b/src/adw-preferences-group.h
index b721d5c0..62841b1f 100644
--- a/src/adw-preferences-group.h
+++ b/src/adw-preferences-group.h
@@ -34,7 +34,7 @@ struct _AdwPreferencesGroupClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_preferences_group_new (void);
+GtkWidget *adw_preferences_group_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_preferences_group_get_title (AdwPreferencesGroup *self);
diff --git a/src/adw-preferences-page-private.h b/src/adw-preferences-page-private.h
index 2b7fd867..5f3cc456 100644
--- a/src/adw-preferences-page-private.h
+++ b/src/adw-preferences-page-private.h
@@ -10,6 +10,6 @@
G_BEGIN_DECLS
-GListModel *adw_preferences_page_get_rows (AdwPreferencesPage *self);
+GListModel *adw_preferences_page_get_rows (AdwPreferencesPage *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-preferences-page.h b/src/adw-preferences-page.h
index affc36dd..58698901 100644
--- a/src/adw-preferences-page.h
+++ b/src/adw-preferences-page.h
@@ -35,7 +35,7 @@ struct _AdwPreferencesPageClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_preferences_page_new (void);
+GtkWidget *adw_preferences_page_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_preferences_page_get_icon_name (AdwPreferencesPage *self);
diff --git a/src/adw-preferences-row.h b/src/adw-preferences-row.h
index 0fe03506..a2c25b36 100644
--- a/src/adw-preferences-row.h
+++ b/src/adw-preferences-row.h
@@ -34,7 +34,7 @@ struct _AdwPreferencesRowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_preferences_row_new (void);
+GtkWidget *adw_preferences_row_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_preferences_row_get_title (AdwPreferencesRow *self);
diff --git a/src/adw-preferences-window.h b/src/adw-preferences-window.h
index 602c1fc7..6ef2ddf3 100644
--- a/src/adw-preferences-window.h
+++ b/src/adw-preferences-window.h
@@ -36,7 +36,7 @@ struct _AdwPreferencesWindowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_preferences_window_new (void);
+GtkWidget *adw_preferences_window_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
gboolean adw_preferences_window_get_search_enabled (AdwPreferencesWindow *self);
diff --git a/src/adw-shadow-helper-private.h b/src/adw-shadow-helper-private.h
index 1bfbdb7a..c78a89cd 100644
--- a/src/adw-shadow-helper-private.h
+++ b/src/adw-shadow-helper-private.h
@@ -18,7 +18,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (AdwShadowHelper, adw_shadow_helper, ADW, SHADOW_HELPER, GObject)
-AdwShadowHelper *adw_shadow_helper_new (GtkWidget *widget);
+AdwShadowHelper *adw_shadow_helper_new (GtkWidget *widget) G_GNUC_WARN_UNUSED_RESULT;
void adw_shadow_helper_size_allocate (AdwShadowHelper *self,
int width,
diff --git a/src/adw-squeezer.h b/src/adw-squeezer.h
index 8b8a5d4b..edbfd9f4 100644
--- a/src/adw-squeezer.h
+++ b/src/adw-squeezer.h
@@ -42,7 +42,7 @@ typedef enum {
} AdwSqueezerTransitionType;
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_squeezer_new (void);
+GtkWidget *adw_squeezer_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwSqueezerPage *adw_squeezer_add (AdwSqueezer *self,
@@ -98,6 +98,6 @@ void adw_squeezer_set_yalign (AdwSqueezer *self,
float yalign);
ADW_AVAILABLE_IN_ALL
-GtkSelectionModel *adw_squeezer_get_pages (AdwSqueezer *self);
+GtkSelectionModel *adw_squeezer_get_pages (AdwSqueezer *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-status-page.h b/src/adw-status-page.h
index 718d27af..47b4d69f 100644
--- a/src/adw-status-page.h
+++ b/src/adw-status-page.h
@@ -22,7 +22,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwStatusPage, adw_status_page, ADW, STATUS_PAGE, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_status_page_new (void);
+GtkWidget *adw_status_page_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_status_page_get_icon_name (AdwStatusPage *self);
diff --git a/src/adw-swipe-tracker.h b/src/adw-swipe-tracker.h
index 1e109d0b..ef9a6cf0 100644
--- a/src/adw-swipe-tracker.h
+++ b/src/adw-swipe-tracker.h
@@ -23,7 +23,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwSwipeTracker, adw_swipe_tracker, ADW, SWIPE_TRACKER, GObject)
ADW_AVAILABLE_IN_ALL
-AdwSwipeTracker *adw_swipe_tracker_new (AdwSwipeable *swipeable);
+AdwSwipeTracker *adw_swipe_tracker_new (AdwSwipeable *swipeable) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwSwipeable *adw_swipe_tracker_get_swipeable (AdwSwipeTracker *self);
diff --git a/src/adw-swipeable.h b/src/adw-swipeable.h
index 00e93bb0..ff36926a 100644
--- a/src/adw-swipeable.h
+++ b/src/adw-swipeable.h
@@ -58,7 +58,7 @@ double adw_swipeable_get_distance (AdwSwipeable *self);
ADW_AVAILABLE_IN_ALL
double *adw_swipeable_get_snap_points (AdwSwipeable *self,
- int *n_snap_points);
+ int *n_snap_points) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
double adw_swipeable_get_progress (AdwSwipeable *self);
diff --git a/src/adw-tab-bar.h b/src/adw-tab-bar.h
index 9f2834ec..1c9d3419 100644
--- a/src/adw-tab-bar.h
+++ b/src/adw-tab-bar.h
@@ -26,7 +26,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwTabBar, adw_tab_bar, ADW, TAB_BAR, GtkWidget)
ADW_AVAILABLE_IN_ALL
-AdwTabBar *adw_tab_bar_new (void);
+AdwTabBar *adw_tab_bar_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwTabView *adw_tab_bar_get_view (AdwTabBar *self);
diff --git a/src/adw-tab-private.h b/src/adw-tab-private.h
index ad6911d2..7eef0421 100644
--- a/src/adw-tab-private.h
+++ b/src/adw-tab-private.h
@@ -22,7 +22,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (AdwTab, adw_tab, ADW, TAB, GtkWidget)
AdwTab *adw_tab_new (AdwTabView *view,
- gboolean pinned);
+ gboolean pinned) G_GNUC_WARN_UNUSED_RESULT;
AdwTabPage *adw_tab_get_page (AdwTab *self);
void adw_tab_set_page (AdwTab *self,
diff --git a/src/adw-tab-view-private.h b/src/adw-tab-view-private.h
index de31494f..0c9735f8 100644
--- a/src/adw-tab-view-private.h
+++ b/src/adw-tab-view-private.h
@@ -25,6 +25,6 @@ void adw_tab_view_attach_page (AdwTabView *self,
AdwTabPage *page,
int position);
-AdwTabView *adw_tab_view_create_window (AdwTabView *self);
+AdwTabView *adw_tab_view_create_window (AdwTabView *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-tab-view.h b/src/adw-tab-view.h
index d140bf7f..86589072 100644
--- a/src/adw-tab-view.h
+++ b/src/adw-tab-view.h
@@ -83,7 +83,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwTabView, adw_tab_view, ADW, TAB_VIEW, GtkWidget)
ADW_AVAILABLE_IN_ALL
-AdwTabView *adw_tab_view_new (void);
+AdwTabView *adw_tab_view_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
int adw_tab_view_get_n_pages (AdwTabView *self);
@@ -208,6 +208,6 @@ void adw_tab_view_transfer_page (AdwTabView *self,
int position);
ADW_AVAILABLE_IN_ALL
-GtkSelectionModel *adw_tab_view_get_pages (AdwTabView *self);
+GtkSelectionModel *adw_tab_view_get_pages (AdwTabView *self) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-value-object.h b/src/adw-value-object.h
index e36e8fb9..1eed049d 100644
--- a/src/adw-value-object.h
+++ b/src/adw-value-object.h
@@ -23,14 +23,14 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwValueObject, adw_value_object, ADW, VALUE_OBJECT, GObject)
ADW_AVAILABLE_IN_ALL
-AdwValueObject *adw_value_object_new (const GValue *value);
+AdwValueObject *adw_value_object_new (const GValue *value) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwValueObject *adw_value_object_new_collect (GType type,
- ...);
+ ...) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
-AdwValueObject *adw_value_object_new_string (const char *string);
+AdwValueObject *adw_value_object_new_string (const char *string) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
-AdwValueObject *adw_value_object_new_take_string (char *string);
+AdwValueObject *adw_value_object_new_take_string (char *string) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const GValue *adw_value_object_get_value (AdwValueObject *value);
@@ -41,6 +41,6 @@ void adw_value_object_copy_value (AdwValueObject *value,
ADW_AVAILABLE_IN_ALL
const char *adw_value_object_get_string (AdwValueObject *value);
ADW_AVAILABLE_IN_ALL
-char *adw_value_object_dup_string (AdwValueObject *value);
+char *adw_value_object_dup_string (AdwValueObject *value) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS
diff --git a/src/adw-view-switcher-bar.h b/src/adw-view-switcher-bar.h
index 3f0cfb58..a3fc38f0 100644
--- a/src/adw-view-switcher-bar.h
+++ b/src/adw-view-switcher-bar.h
@@ -25,7 +25,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwViewSwitcherBar, adw_view_switcher_bar, ADW, VIEW_SWITCHER_BAR, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_view_switcher_bar_new (void);
+GtkWidget *adw_view_switcher_bar_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwViewSwitcherPolicy adw_view_switcher_bar_get_policy (AdwViewSwitcherBar *self);
diff --git a/src/adw-view-switcher-button-private.h b/src/adw-view-switcher-button-private.h
index efc96f81..3ff1041f 100644
--- a/src/adw-view-switcher-button-private.h
+++ b/src/adw-view-switcher-button-private.h
@@ -19,7 +19,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (AdwViewSwitcherButton, adw_view_switcher_button, ADW, VIEW_SWITCHER_BUTTON,
GtkToggleButton)
-GtkWidget *adw_view_switcher_button_new (void);
+GtkWidget *adw_view_switcher_button_new (void) G_GNUC_WARN_UNUSED_RESULT;
const char *adw_view_switcher_button_get_icon_name (AdwViewSwitcherButton *self);
void adw_view_switcher_button_set_icon_name (AdwViewSwitcherButton *self,
diff --git a/src/adw-view-switcher-title.h b/src/adw-view-switcher-title.h
index 735f4b81..b11c6e82 100644
--- a/src/adw-view-switcher-title.h
+++ b/src/adw-view-switcher-title.h
@@ -25,7 +25,7 @@ ADW_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (AdwViewSwitcherTitle, adw_view_switcher_title, ADW, VIEW_SWITCHER_TITLE, GtkWidget)
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_view_switcher_title_new (void);
+GtkWidget *adw_view_switcher_title_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwViewSwitcherPolicy adw_view_switcher_title_get_policy (AdwViewSwitcherTitle *self);
diff --git a/src/adw-view-switcher.h b/src/adw-view-switcher.h
index 26dd447e..bc9227cc 100644
--- a/src/adw-view-switcher.h
+++ b/src/adw-view-switcher.h
@@ -29,7 +29,7 @@ typedef enum {
} AdwViewSwitcherPolicy;
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_view_switcher_new (void);
+GtkWidget *adw_view_switcher_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
AdwViewSwitcherPolicy adw_view_switcher_get_policy (AdwViewSwitcher *self);
diff --git a/src/adw-window-mixin-private.h b/src/adw-window-mixin-private.h
index db6c670f..9473e898 100644
--- a/src/adw-window-mixin-private.h
+++ b/src/adw-window-mixin-private.h
@@ -19,7 +19,7 @@ G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE (AdwWindowMixin, adw_window_mixin, ADW, WINDOW_MIXIN, GObject)
AdwWindowMixin *adw_window_mixin_new (GtkWindow *window,
- GtkWindowClass *klass);
+ GtkWindowClass *klass) G_GNUC_WARN_UNUSED_RESULT;
void adw_window_mixin_size_allocate (AdwWindowMixin *self,
int width,
diff --git a/src/adw-window-title.h b/src/adw-window-title.h
index ce778f64..1e6f43c6 100644
--- a/src/adw-window-title.h
+++ b/src/adw-window-title.h
@@ -23,7 +23,7 @@ G_DECLARE_FINAL_TYPE (AdwWindowTitle, adw_window_title, ADW, WINDOW_TITLE, GtkWi
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_window_title_new (const char *title,
- const char *subtitle);
+ const char *subtitle) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
const char *adw_window_title_get_title (AdwWindowTitle *self);
diff --git a/src/adw-window.h b/src/adw-window.h
index 516d6cd6..4ef9b31f 100644
--- a/src/adw-window.h
+++ b/src/adw-window.h
@@ -30,7 +30,7 @@ struct _AdwWindowClass
};
ADW_AVAILABLE_IN_ALL
-GtkWidget *adw_window_new (void);
+GtkWidget *adw_window_new (void) G_GNUC_WARN_UNUSED_RESULT;
ADW_AVAILABLE_IN_ALL
GtkWidget *adw_window_get_child (AdwWindow *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]