internal: fix clang-tidy "errors" (#11862)

This commit is contained in:
UjinT34 2025-09-29 15:10:15 +03:00 committed by GitHub
parent 43fb4753fc
commit 4d82cc5957
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 133 additions and 26 deletions

View file

@ -64,9 +64,9 @@ xcb_window_t CX11DataDevice::getProxyWindow(xcb_window_t window) {
Debug::log(LOG, "Using XdndProxy window {:x} for window {:x}", proxyWindow, window);
}
}
free(proxyVerifyReply);
free(proxyVerifyReply); // NOLINT(cppcoreguidelines-no-malloc)
}
free(proxyReply);
free(proxyReply); // NOLINT(cppcoreguidelines-no-malloc)
return targetWindow;
}

View file

@ -17,7 +17,7 @@ CXDataSource::CXDataSource(SXSelection& sel_) : m_selection(sel_) {
return;
if (reply->type != XCB_ATOM_ATOM) {
free(reply);
free(reply); // NOLINT(cppcoreguidelines-no-malloc)
return;
}
@ -41,7 +41,7 @@ CXDataSource::CXDataSource(SXSelection& sel_) : m_selection(sel_) {
m_mimeAtoms.push_back(value[i]);
}
free(reply);
free(reply); // NOLINT(cppcoreguidelines-no-malloc)
}
std::vector<std::string> CXDataSource::mimes() {

View file

@ -35,11 +35,11 @@ CXWaylandSurface::CXWaylandSurface(uint32_t xID_, CBox geometry_, bool OR) : m_x
xcb_res_client_id_value_next(&iter);
}
if (!ppid) {
free(reply);
free(reply); // NOLINT(cppcoreguidelines-no-malloc)
return;
}
m_pid = *ppid;
free(reply);
free(reply); // NOLINT(cppcoreguidelines-no-malloc)
}
m_events.resourceChange.listenStatic([this] { ensureListeners(); });

View file

@ -33,7 +33,7 @@ static int onX11Event(int fd, uint32_t mask, void* data) {
struct SFreeDeleter {
void operator()(void* ptr) const {
std::free(ptr);
std::free(ptr); // NOLINT(cppcoreguidelines-no-malloc)
}
};
@ -1292,7 +1292,7 @@ void CXWM::getTransferData(SXSelection& sel) {
if (transfer->propertyReply->type == HYPRATOMS["INCR"]) {
transfer->incremental = true;
transfer->propertyStart = 0;
free(transfer->propertyReply);
free(transfer->propertyReply); // NOLINT(cppcoreguidelines-no-malloc)
transfer->propertyReply = nullptr;
return;
}
@ -1544,7 +1544,7 @@ int SXSelection::onWrite() {
if (!transfer->incremental) {
transfers.erase(it);
} else {
free(transfer->propertyReply);
free(transfer->propertyReply); // NOLINT(cppcoreguidelines-no-malloc)
transfer->propertyReply = nullptr;
transfer->propertyStart = 0;
}
@ -1559,7 +1559,7 @@ SXTransfer::~SXTransfer() {
if (incomingWindow)
xcb_destroy_window(*g_pXWayland->m_wm->m_connection, incomingWindow);
if (propertyReply)
free(propertyReply);
free(propertyReply); // NOLINT(cppcoreguidelines-no-malloc)
}
bool SXTransfer::getIncomingSelectionProp(bool erase) {