summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-09-28 20:01:35 +0200
committerMarc Mutz <marc.mutz@kdab.com>2016-09-30 10:09:58 +0000
commite0e4269e289ef84433d8c10fee721a7983c180ad (patch)
tree38af6cf919aefcd491b0cff27bc5c1ce20559dbd /tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp
parent85d7c732e9b84a9afdb040d01e7bb7166f605abe (diff)
tst_QAbstractSlider: fix strict-aliasing warnings
GCC warned: tst_qabstractslider.cpp:858:89: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Qt::Orientation orientation = *reinterpret_cast<Qt::Orientation*>(&sliderOrientation); ^ tst_qabstractslider.cpp:867:72: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] orientation = *reinterpret_cast<Qt::Orientation*>(&wheelOrientation); ^ The solution, of course, would be to use a static_cast here, but why go via int in the first place? Qt::Orientation can perfectly well be used in QFETCH, as proven by tst_qmainwindow, among other things. Change-Id: I97916a50405e16d114837bc52580ce6666d74b17 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp')
0 files changed, 0 insertions, 0 deletions