make_and_run_test_nodes: avoid undefined behaviour
authorDreamNik <dreamnik@mail.ru>
Sun, 29 Sep 2013 10:45:58 +0000 (14:45 +0400)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 4 Nov 2013 11:42:04 +0000 (11:42 +0000)
commit7c00ed22d9b5c33f5b33221e906946b11a9bde3b
treeec7ac05492af2757f79d588cabf4b0139eccb52d
parentba7b85711838cf9b9dfa30dde74a636393235c3e
make_and_run_test_nodes: avoid undefined behaviour

In code that looks like n[i] = v(&i), where v increments i, C leaves it
undefined whether the old or new value of i is used to locate n[i].
As it happens, gcc used the pre-increment value of i, but MSVC
used the post-increment value.

Fix this by inserting a sequence point to disambiguate the intended order.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=69924
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
[wrote commit message, fixed whitespace -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
dbus/dbus-marshal-recursive-util.c