mirror of
https://github.com/hyprwm/Hyprland
synced 2025-04-06 14:32:03 +02:00
ci: Fail on warnings (#9668)
* ci: Fail on warnings * misc: Fix compiler warnings
This commit is contained in:
parent
03385fc07f
commit
c8d80a2920
4 changed files with 14 additions and 7 deletions
.github/workflows
src
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
|
@ -21,7 +21,7 @@ jobs:
|
|||
|
||||
- name: Build Hyprland
|
||||
run: |
|
||||
make all
|
||||
CFLAGS=-Werror CXXFLAGS=-Werror make all
|
||||
|
||||
- name: Compress and package artifacts
|
||||
run: |
|
||||
|
|
|
@ -61,9 +61,10 @@ struct SVersionInfo {
|
|||
|
||||
// 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"
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
|
||||
#endif
|
||||
|
||||
class IHyprLayout;
|
||||
class CWindow;
|
||||
|
@ -322,4 +323,6 @@ APICALL inline EXPORT const char* __hyprland_api_get_client_hash() {
|
|||
}
|
||||
// NOLINTEND
|
||||
|
||||
#pragma GCC diagnostic pop
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "FrogColorManagement.hpp"
|
||||
#include "color-management-v1.hpp"
|
||||
#include "macros.hpp"
|
||||
#include "protocols/ColorManagement.hpp"
|
||||
#include "protocols/core/Subcompositor.hpp"
|
||||
#include "protocols/types/ColorManagement.hpp"
|
||||
|
@ -13,6 +14,7 @@ static wpColorManagerV1TransferFunction getWPTransferFunction(frogColorManagedSu
|
|||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_GAMMA_22: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_GAMMA22;
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ST2084_PQ: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST2084_PQ;
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SCRGB_LINEAR: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_EXT_LINEAR;
|
||||
default: UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,9 +105,10 @@ CFrogColorManagementSurface::CFrogColorManagementSurface(SP<CFrogColorManagedSur
|
|||
surface->colorManagement->m_imageDescription.transferFunction =
|
||||
convertTransferFunction(getWPTransferFunction(FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ST2084_PQ));
|
||||
break;
|
||||
}; // intended fall through
|
||||
};
|
||||
[[fallthrough]];
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_UNDEFINED:
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SCRGB_LINEAR: LOGM(TRACE, "FIXME: add tf support for {}", (uint32_t)tf); // intended fall through
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SCRGB_LINEAR: LOGM(TRACE, "FIXME: add tf support for {}", (uint32_t)tf); [[fallthrough]];
|
||||
case FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SRGB:
|
||||
surface->colorManagement->m_imageDescription.transferFunction = convertTransferFunction(getWPTransferFunction(tf));
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ static wpColorManagerV1TransferFunction getWPTransferFunction(xxColorManagerV4Tr
|
|||
case XX_COLOR_MANAGER_V4_TRANSFER_FUNCTION_ST2084_PQ: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST2084_PQ;
|
||||
case XX_COLOR_MANAGER_V4_TRANSFER_FUNCTION_ST428: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_ST428;
|
||||
case XX_COLOR_MANAGER_V4_TRANSFER_FUNCTION_HLG: return WP_COLOR_MANAGER_V1_TRANSFER_FUNCTION_HLG;
|
||||
default: UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue