Fix -Wformat
QVector::count()'s return type is qsizetype. On a 64 bit platform, it's equivalent to qint64, so "%d" does not suffice. There are two ways to fix it: use PRIdQSIZETYPE or switch to the stream operator. Since the warning format is not complex, this takes the latter approach.
This commit is contained in:
parent
328cf606d4
commit
d6309eb605
1 changed files with 2 additions and 2 deletions
|
@ -622,13 +622,13 @@ std::unique_ptr<DrmLease> DrmGpu::leaseOutputs(const QVector<DrmOutput *> &outpu
|
|||
FileDescriptor fd{drmModeCreateLease(m_fd, objects.constData(), objects.count(), 0, &lesseeId)};
|
||||
if (!fd.isValid()) {
|
||||
qCWarning(KWIN_DRM) << "Could not create DRM lease!" << strerror(errno);
|
||||
qCWarning(KWIN_DRM, "Tried to lease the following %d resources:", objects.count());
|
||||
qCWarning(KWIN_DRM) << "Tried to lease the following" << objects.count() << "resources:";
|
||||
for (const auto &res : std::as_const(objects)) {
|
||||
qCWarning(KWIN_DRM) << res;
|
||||
}
|
||||
return nullptr;
|
||||
} else {
|
||||
qCDebug(KWIN_DRM, "Created lease for %d resources:", objects.count());
|
||||
qCDebug(KWIN_DRM) << "Created lease for" << objects.count() << "resources:";
|
||||
for (const auto &res : std::as_const(objects)) {
|
||||
qCDebug(KWIN_DRM) << res;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue