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. Change-Id: Ie67a5d820203219ce2eb91faf5dea8d6051a5e08 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io> (cherry picked from commit 3bffd2e01b9b2a7114e66830f49f7f0bd7752a34) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
c988a7eeb6
commit
3e0a7bf4f4
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user