tracegen: Give warning if flag value is npot2

Flag values can have mask values, which have multiple bits set.
Give warning instead of panic if a flag value is not power of two.

Pick-to: 6.5
Change-Id: Ie67a5d820203219ce2eb91faf5dea8d6051a5e08
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
This commit is contained in:
Antti Määttä 2023-01-30 09:09:28 +02:00
parent 9a756e3e01
commit 3bffd2e01b

View File

@ -394,8 +394,8 @@ Provider parseProvider(const QString &filename)
value.name = m.captured(1);
value.value = m.captured(3).toInt();
if (!isPow2OrZero(value.value)) {
panic("Syntax error while processing '%s' line %d:\n"
" '%s' flag value is now power of two",
printf("Warning: '%s' line %d:\n"
" '%s' flag value is not power of two.\n",
qPrintable(filename), lineNumber,
qPrintable(line));
}