[gnome-shell] Remove C99 use of non-constant initializers
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Remove C99 use of non-constant initializers
- Date: Mon, 8 Feb 2010 19:07:39 +0000 (UTC)
commit dce4b2f325140d6d76aa9b35e0d1e66e01777231
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Feb 1 18:31:13 2010 -0500
Remove C99 use of non-constant initializers
To comply with C89, structure initializers should have
only constant values.
(Not a thorough check for this throughout the codebase, just
StWidget is fixed up in this commit.)
https://bugzilla.gnome.org/show_bug.cgi?id=608746
src/st/st-widget.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/st/st-widget.c b/src/st/st-widget.c
index e0a7e00..294fc01 100644
--- a/src/st/st-widget.c
+++ b/src/st/st-widget.c
@@ -308,12 +308,11 @@ st_widget_allocate (ClutterActor *actor,
if (priv->border_image && priv->bg_gradient_type == ST_GRADIENT_NONE)
{
- ClutterActorBox frame_box = {
- 0,
- 0,
- box->x2 - box->x1,
- box->y2 - box->y1
- };
+ ClutterActorBox frame_box;
+
+ frame_box.x1 = frame_box.y1 = 0;
+ frame_box.x2 = box->x2 - box->x1;
+ frame_box.y2 = box->y2 - box->y1;
clutter_actor_allocate (CLUTTER_ACTOR (priv->border_image),
&frame_box,
@@ -350,11 +349,13 @@ st_widget_allocate (ClutterActor *actor,
if (priv->background_image)
{
- ClutterActorBox frame_box = {
- 0, 0, box->x2 - box->x1, box->y2 - box->y1
- };
+ ClutterActorBox frame_box;
gfloat w, h;
+ frame_box.x1 = frame_box.y1 = 0;
+ frame_box.x2 = box->x2 - box->x1;
+ frame_box.y2 = box->y2 - box->y1;
+
clutter_actor_get_size (CLUTTER_ACTOR (priv->background_image), &w, &h);
/* scale the background into the allocated bounds */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]