Fix signed integer overflows in tst_QAtomicInteger
Signed integer overflows and underflows are undefined
behavior. A test that invokes UB tests nothing, because
the standard permits any outcome.
Fix by guarding the respective operations so
they are not executed if they would overflow
or underflow.
Change-Id: I40354ee88f40e4b47b70eac7790dc3a79ac70a57
Reviewed-by:
Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Showing
Please register or sign in to comment