tst_QGlobal: fix -Wmaybe-uninitialized
GCC 14 doesn't understand that neither q_check_ptr() nor qCompare<int*> dereference the pointer. Since the missing initialization isn't part of the test (except, maybe, to provoke this warning if the implementation indeed changed to dereference the pointer), fix by initializing the int, like we do for the string a few lines below. Amends the start of the public history. Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: I6033e026f041b03821b776daa8e65586b8054136 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
c880a3867a
commit
8e914e07fb
@ -261,7 +261,7 @@ void tst_QGlobal::qtry()
|
||||
|
||||
void tst_QGlobal::checkptr()
|
||||
{
|
||||
int i;
|
||||
int i = 0;
|
||||
QCOMPARE(q_check_ptr(&i), &i);
|
||||
|
||||
const char *c = "hello";
|
||||
|
Loading…
x
Reference in New Issue
Block a user