[gtk] widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk] widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
- Date: Wed, 20 Feb 2019 04:30:01 +0000 (UTC)
commit 02e856f62e9eee7796bdff9ba8d8a9bda31c60fc
Author: Benjamin Otte <otte redhat com>
Date: Wed Feb 20 05:00:13 2019 +0100
widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
Lots of code does not error-check these functions, and when we add CSS
transforms, they will start failing. And we want people to check that.
gtk/gtkwidget.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index f57f64b5ee..5e1768e132 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -612,16 +612,16 @@ void gtk_widget_get_allocation (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_compute_transform (GtkWidget *widget,
GtkWidget *target,
- graphene_matrix_t *out_transform);
+ graphene_matrix_t *out_transform)
G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_compute_bounds (GtkWidget *widget,
GtkWidget *target,
- graphene_rect_t *out_bounds);
+ graphene_rect_t *out_bounds)
G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_compute_point (GtkWidget *widget,
GtkWidget *target,
const graphene_point_t *point,
- graphene_point_t *out_point);
+ graphene_point_t *out_point)
G_GNUC_WARN_UNUSED_RESULT;
GDK_AVAILABLE_IN_ALL
int gtk_widget_get_width (GtkWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]