]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
dbus-launch-x11.c: Silence clang -Wcast-align warning
authorAlex Richardson <arichardson@FreeBSD.org>
Mon, 8 Aug 2022 21:03:57 +0000 (21:03 +0000)
committerSimon McVittie <smcv@collabora.com>
Wed, 10 Aug 2022 11:18:20 +0000 (11:18 +0000)
In this case the cast is safe since the manual guarantees that the
underlying storage is an array of `long`.

tools/dbus-launch-x11.c

index 48ab51d899ee427024a31ded4430c92be067fb35..59694c3195f47885c5017c75d914403dccc8bccd 100644 (file)
@@ -335,7 +335,7 @@ x11_get_address (char **paddress, pid_t *pid, long *wid)
                                    XA_CARDINAL, &type, &format, &items, &after,
                                    (unsigned char **) &data);
       if (result == Success && type != None && after == 0 && data != NULL && format == 32)
-        *pid = (pid_t) *(long*) data;
+        *pid = (pid_t) *(long*) (void*) data;
       XFree (data);
     }