[gtk+] Add braces to appease gcc
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add braces to appease gcc
- Date: Thu, 25 Aug 2016 21:02:56 +0000 (UTC)
commit 35c96c2c1f15c6c2a52a380ef6b8fa1062597b8d
Author: Benjamin Otte <otte redhat com>
Date: Thu Aug 25 23:01:28 2016 +0200
Add braces to appease gcc
-ftrack-macro-expansion=0 doesn't like if statements without braces when
evaluating indentation levels.
gtk/gtkcomposetable.c | 4 +++-
gtk/gtkcssselector.c | 12 +++++++++---
gtk/gtksizerequest.c | 6 ++++--
3 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcomposetable.c b/gtk/gtkcomposetable.c
index 7a0aba7..7b45dfb 100644
--- a/gtk/gtkcomposetable.c
+++ b/gtk/gtkcomposetable.c
@@ -573,7 +573,9 @@ gtk_compose_table_serialize (GtkComposeTable *compose_table,
(long long) (p - contents), total_length); \
g_free (contents); \
if (count) \
- *count = 0; \
+ { \
+ *count = 0; \
+ } \
return NULL; \
}
diff --git a/gtk/gtkcssselector.c b/gtk/gtkcssselector.c
index 9309de5..d3bcc79 100644
--- a/gtk/gtkcssselector.c
+++ b/gtk/gtkcssselector.c
@@ -507,11 +507,17 @@ gtk_css_selector_ ## n ## _add_specificity (const GtkCssSelector *selector, \
guint *elements) \
{ \
if (increase_id_specificity) \
- (*ids)++; \
+ { \
+ (*ids)++; \
+ } \
if (increase_class_specificity) \
- (*classes)++; \
+ { \
+ (*classes)++; \
+ } \
if (increase_element_specificity) \
- (*elements)++; \
+ { \
+ (*elements)++; \
+ } \
} \
\
static const GtkCssSelectorClass GTK_CSS_SELECTOR_ ## c = { \
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index ed60b43..1dd3671 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -351,8 +351,10 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
: "height for width",
for_size, min_size, nat_size);
if (min_baseline != -1 || nat_baseline != -1)
- g_string_append_printf (s, ", baseline %d/%d",
- min_baseline, nat_baseline);
+ {
+ g_string_append_printf (s, ", baseline %d/%d",
+ min_baseline, nat_baseline);
+ }
g_string_append_printf (s, " (hit cache: %s)\n",
found_in_cache ? "yes" : "no");
g_message ("%s", s->str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]