codechecker: Add assert for implicit condition
Since memReq is initialized inside the loop, codechecker complained that we might use uninitialized data if count == 0. So we assert that this is not the case to get rid of the warning. Change-Id: I82152942d2bb61723e9e41489c87bfde9f8bec15 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
e9cdcc7cb3
commit
30f1f02cf7
@ -1330,6 +1330,7 @@ bool QVulkanWindowPrivate::createTransientImage(VkFormat format,
|
||||
VkMemoryRequirements memReq;
|
||||
VkResult err;
|
||||
|
||||
Q_ASSERT(count > 0);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
VkImageCreateInfo imgInfo;
|
||||
memset(&imgInfo, 0, sizeof(imgInfo));
|
||||
|
Loading…
Reference in New Issue
Block a user