mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-13 07:10:35 +01:00
internal: Fix compiler warnings (#9646)
This commit is contained in:
parent
efc51eb7d1
commit
011d7ccb91
10 changed files with 20 additions and 17 deletions
|
@ -1240,7 +1240,7 @@ void CMonitor::setSpecialWorkspace(const PHLWORKSPACE& pWorkspace) {
|
|||
}
|
||||
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", pWorkspace->m_szName + "," + szName});
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", pWorkspace->m_iID + "," + pWorkspace->m_szName + "," + szName});
|
||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecialv2", std::to_string(pWorkspace->m_iID) + "," + pWorkspace->m_szName + "," + szName});
|
||||
|
||||
g_pHyprRenderer->damageMonitor(self.lock());
|
||||
|
||||
|
|
|
@ -89,6 +89,7 @@
|
|||
{ \
|
||||
Debug::log(CRIT, "\n\nMEMORY CORRUPTED: Unreachable failed! (Reached an unreachable position, memory corruption!!!)"); \
|
||||
raise(SIGABRT); \
|
||||
std::unreachable(); \
|
||||
}
|
||||
#else
|
||||
#define UNREACHABLE() std::unreachable();
|
||||
|
|
|
@ -59,6 +59,12 @@ struct SVersionInfo {
|
|||
#define OPTIONAL
|
||||
#define HANDLE void*
|
||||
|
||||
// C ABI is needed to prevent symbol mangling, but we don't actually need C compatibility,
|
||||
// so we ignore this warning about return types that are potentially incompatible with C.
|
||||
// Clang supports this pragma too.
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
|
||||
|
||||
class IHyprLayout;
|
||||
class CWindow;
|
||||
class IHyprWindowDecoration;
|
||||
|
@ -70,7 +76,7 @@ class CWindow;
|
|||
Methods marked with REQUIRED are required.
|
||||
*/
|
||||
|
||||
/*
|
||||
/*
|
||||
called pre-plugin init.
|
||||
In case of a version mismatch, will eject the .so.
|
||||
|
||||
|
@ -315,3 +321,5 @@ APICALL inline EXPORT const char* __hyprland_api_get_client_hash() {
|
|||
return GIT_COMMIT_HASH;
|
||||
}
|
||||
// NOLINTEND
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
|
|
|
@ -9,8 +9,7 @@
|
|||
#include <fcntl.h>
|
||||
using namespace Hyprutils::OS;
|
||||
|
||||
CDRMSyncPointState::CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_, bool acquirePoint) :
|
||||
m_resource(resource_), m_point(point_), m_acquirePoint(acquirePoint) {}
|
||||
CDRMSyncPointState::CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_) : m_resource(resource_), m_point(point_) {}
|
||||
|
||||
const uint64_t& CDRMSyncPointState::point() {
|
||||
return m_point;
|
||||
|
@ -95,7 +94,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(UP<CWpLinuxDrmSyncobjSurf
|
|||
}
|
||||
|
||||
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
||||
pendingAcquire = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo, true};
|
||||
pendingAcquire = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo};
|
||||
});
|
||||
|
||||
resource->setSetReleasePoint([this](CWpLinuxDrmSyncobjSurfaceV1* r, wl_resource* timeline_, uint32_t hi, uint32_t lo) {
|
||||
|
@ -105,7 +104,7 @@ CDRMSyncobjSurfaceResource::CDRMSyncobjSurfaceResource(UP<CWpLinuxDrmSyncobjSurf
|
|||
}
|
||||
|
||||
auto timeline = CDRMSyncobjTimelineResource::fromResource(timeline_);
|
||||
pendingRelease = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo, false};
|
||||
pendingRelease = {timeline, ((uint64_t)hi << 32) | (uint64_t)lo};
|
||||
});
|
||||
|
||||
listeners.surfacePrecommit = surface->events.precommit.registerListener([this](std::any d) {
|
||||
|
|
|
@ -17,7 +17,7 @@ struct SSurfaceState;
|
|||
class CDRMSyncPointState {
|
||||
public:
|
||||
CDRMSyncPointState() = default;
|
||||
CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_, bool acquirePoint);
|
||||
CDRMSyncPointState(WP<CDRMSyncobjTimelineResource> resource_, uint64_t point_);
|
||||
~CDRMSyncPointState() = default;
|
||||
|
||||
const uint64_t& point();
|
||||
|
@ -34,7 +34,6 @@ class CDRMSyncPointState {
|
|||
WP<CDRMSyncobjTimelineResource> m_resource = {};
|
||||
uint64_t m_point = 0;
|
||||
WP<CSyncTimeline> m_timeline = {};
|
||||
bool m_acquirePoint = false;
|
||||
bool m_acquireCommitted = false;
|
||||
bool m_releaseTaken = false;
|
||||
};
|
||||
|
|
|
@ -33,7 +33,6 @@ class CPointerConstraint {
|
|||
private:
|
||||
SP<CZwpLockedPointerV1> resourceL;
|
||||
SP<CZwpConfinedPointerV1> resourceC;
|
||||
wl_client* pClient = nullptr;
|
||||
|
||||
WP<CWLSurface> pHLSurface;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ class CXDGActivationToken {
|
|||
uint32_t serial = 0;
|
||||
std::string appID = "";
|
||||
bool committed = false;
|
||||
bool used = false;
|
||||
|
||||
std::string token = "";
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ class CWLDataOfferResource : public IDataOffer {
|
|||
|
||||
private:
|
||||
SP<CWlDataOffer> resource;
|
||||
wl_client* pClient = nullptr;
|
||||
|
||||
friend class CWLDataDeviceResource;
|
||||
};
|
||||
|
@ -89,7 +88,6 @@ class CWLDataSourceResource : public IDataSource {
|
|||
|
||||
private:
|
||||
SP<CWlDataSource> resource;
|
||||
wl_client* pClient = nullptr;
|
||||
|
||||
friend class CWLDataDeviceProtocol;
|
||||
};
|
||||
|
|
|
@ -129,7 +129,7 @@ void CX11DataDevice::sendEnter(uint32_t serial, SP<CWLSurfaceResource> surf, con
|
|||
|
||||
xcb_window_t targetWindow = getProxyWindow(XSURF->xID);
|
||||
|
||||
xcb_client_message_data_t data = {0};
|
||||
xcb_client_message_data_t data = {{0}};
|
||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||
data.data32[1] = XDND_VERSION << 24;
|
||||
data.data32[1] |= 1;
|
||||
|
@ -164,7 +164,7 @@ void CX11DataDevice::sendLeave() {
|
|||
|
||||
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
||||
|
||||
xcb_client_message_data_t data = {0};
|
||||
xcb_client_message_data_t data = {{0}};
|
||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||
|
||||
sendDndEvent(targetWindow, HYPRATOMS["XdndLeave"], data);
|
||||
|
@ -183,7 +183,7 @@ void CX11DataDevice::sendMotion(uint32_t timeMs, const Vector2D& local) {
|
|||
const auto XCOORDS = g_pXWaylandManager->waylandToXWaylandCoords(lastSurfaceCoords + local);
|
||||
const uint32_t coords = ((uint32_t)XCOORDS.x << 16) | (uint32_t)XCOORDS.y;
|
||||
|
||||
xcb_client_message_data_t data = {0};
|
||||
xcb_client_message_data_t data = {{0}};
|
||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||
data.data32[2] = coords;
|
||||
data.data32[3] = timeMs;
|
||||
|
@ -204,7 +204,7 @@ void CX11DataDevice::sendDrop() {
|
|||
|
||||
xcb_window_t targetWindow = getProxyWindow(lastSurface->xID);
|
||||
|
||||
xcb_client_message_data_t data = {0};
|
||||
xcb_client_message_data_t data = {{0}};
|
||||
data.data32[0] = g_pXWayland->pWM->dndSelection.window;
|
||||
data.data32[2] = lastTime;
|
||||
|
||||
|
|
|
@ -494,7 +494,7 @@ void CXWM::focusWindow(SP<CXWaylandSurface> surf) {
|
|||
if (surf->overrideRedirect)
|
||||
return;
|
||||
|
||||
xcb_client_message_data_t msg = {0};
|
||||
xcb_client_message_data_t msg = {{0}};
|
||||
msg.data32[0] = HYPRATOMS["WM_TAKE_FOCUS"];
|
||||
msg.data32[1] = XCB_TIME_CURRENT_TIME;
|
||||
|
||||
|
|
Loading…
Reference in a new issue