After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 632581 - gdbusmessage.c,gregistrysettingsbackend.c: variables C99ism
gdbusmessage.c,gregistrysettingsbackend.c: variables C99ism
Status: RESOLVED DUPLICATE of bug 635093
Product: glib
Classification: Platform
Component: gio
2.26.x
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-10-19 17:12 UTC by Kazuki Iwamoto
Modified: 2011-01-30 07:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gdbusmessage.c (629 bytes, patch)
2010-10-19 17:14 UTC, Kazuki Iwamoto
rejected Details | Review
patch for gregistrysettingsbackend.c (3.06 KB, patch)
2010-10-19 17:14 UTC, Kazuki Iwamoto
none Details | Review

Description Kazuki Iwamoto 2010-10-19 17:12:51 UTC
Some variables are declared at the middle of the block.
Old compiler will occur error, because of C99ism.
The declaration should be moved to the top of the block.
Comment 1 Kazuki Iwamoto 2010-10-19 17:14:11 UTC
Created attachment 172743 [details] [review]
patch for gdbusmessage.c
Comment 2 Kazuki Iwamoto 2010-10-19 17:14:46 UTC
Created attachment 172744 [details] [review]
patch for gregistrysettingsbackend.c
Comment 3 David Zeuthen (not reading bugmail) 2010-10-19 18:38:09 UTC
Comment on attachment 172743 [details] [review]
patch for gdbusmessage.c

(In reply to comment #1)
>          {
>            guint64 v;
>            gdouble *encoded;
> +          G_STATIC_ASSERT (sizeof (gdouble) == sizeof (guint64));
>            v = g_data_input_stream_read_uint64 (dis, NULL, &local_error);
>            if (local_error != NULL)
>              goto fail;
> -          G_STATIC_ASSERT (sizeof (gdouble) == sizeof (guint64));
>            encoded = (gdouble *) &v;
>            ret = g_variant_new_double (*encoded);
>          }

Sorry, but I don't see how this is wrong.
Comment 4 Christian Dywan 2010-10-20 10:35:08 UTC
(In reply to comment #3)
> Sorry, but I don't see how this is wrong.

G_STATIC_ASSERT expands to typedef, so technically it's a declaration.
Comment 5 Kazuki Iwamoto 2011-01-30 07:35:18 UTC
This problem was already resolved in #635093.

*** This bug has been marked as a duplicate of bug 635093 ***