mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
tests: data-input-stream: fix -Wduplicated-branches
The fix makes things a bit awkward, but it seems to work just fine. https://bugzilla.gnome.org/show_bug.cgi?id=793399
This commit is contained in:
parent
59d4ee99f2
commit
c01c255895
@ -337,14 +337,15 @@ enum TestDataType {
|
||||
TEST_DATA_UINT64
|
||||
};
|
||||
|
||||
/* The order is reversed to avoid -Wduplicated-branches. */
|
||||
#define TEST_DATA_RETYPE_BUFF(a, t, v) \
|
||||
(a == TEST_DATA_BYTE ? (t) *(guchar*)v : \
|
||||
(a == TEST_DATA_INT16 ? (t) *(gint16*)v : \
|
||||
(a == TEST_DATA_UINT16 ? (t) *(guint16*)v : \
|
||||
(a == TEST_DATA_INT32 ? (t) *(gint32*)v : \
|
||||
(a == TEST_DATA_UINT32 ? (t) *(guint32*)v : \
|
||||
(a == TEST_DATA_INT64 ? (t) *(gint64*)v : \
|
||||
(t) *(guint64*)v ))))))
|
||||
(a == TEST_DATA_UINT64 ? (t) *(guint64*)v : \
|
||||
(a == TEST_DATA_INT64 ? (t) *(gint64*)v : \
|
||||
(a == TEST_DATA_UINT32 ? (t) *(guint32*)v : \
|
||||
(a == TEST_DATA_INT32 ? (t) *(gint32*)v : \
|
||||
(a == TEST_DATA_UINT16 ? (t) *(guint16*)v : \
|
||||
(a == TEST_DATA_INT16 ? (t) *(gint16*)v : \
|
||||
(t) *(guchar*)v ))))))
|
||||
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user