summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-08-05 10:21:21 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-07 13:35:45 +0200
commit096e268764397f781e72619e3b5f546d5786cae1 (patch)
treebdd0db7dc4e682125792a78b781b1f3064051a37 /src/gui/painting
parent3f64d770037a0e3adc9685eb0a1d326515f87b42 (diff)
Avoid UB in moc generated code
Introduce a Q_OFFSETOF() macro that uses the optional support of offsetof() for non standard layout types and disables the corresponding compiler warnings. All our supported compilers support offsetof() on non standard layout types. Use the macro to do the offset calculations required in moc generated code to replace a manual offset calculation that was dereferencing a null pointer. Change-Id: I4aab3af3c8bbaa90372f2234aa1cf8399d023c22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting')
0 files changed, 0 insertions, 0 deletions