mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
G_STATIC_ASSERT: clarify when use is valid
Clarify when the use of G_STATIC_ASSERT is valid and fix up an invalid use of it in GDBus.
This commit is contained in:
@@ -1183,10 +1183,10 @@ parse_value_from_blob (GMemoryInputStream *mis,
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user