From 259604f63dba5f958b879813d1eaed9a59991d1e Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 5 Mar 2025 20:59:57 +0100 Subject: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/gamma-coopgamma.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/gamma-coopgamma.c') diff --git a/src/gamma-coopgamma.c b/src/gamma-coopgamma.c index 4e579c2..fe01cb5 100644 --- a/src/gamma-coopgamma.c +++ b/src/gamma-coopgamma.c @@ -47,13 +47,14 @@ struct gamma_state { }; -struct signal_blockage { -}; +struct signal_blockage {int dummy;}; static int unblocked_signal(int signo, struct signal_blockage *prev) { /* TODO */ + (void) signo; + (void) prev; return 0; } @@ -62,6 +63,8 @@ static int restore_signal_blockage(int signo, const struct signal_blockage *blockage) { /* TODO */ + (void) signo; + (void) blockage; return 0; } @@ -150,6 +153,8 @@ coopgamma_start(struct gamma_state *state, enum program_mode mode) case PROGRAM_MODE_MANUAL: lifespan = LIBCOOPGAMMA_UNTIL_REMOVAL; break; + case PROGRAM_MODE_CONTINUAL: + case PROGRAM_MODE_PRINT: /* TODO ? */ default: lifespan = LIBCOOPGAMMA_UNTIL_DEATH; break; @@ -246,8 +251,15 @@ coopgamma_start(struct gamma_state *state, enum program_mode mode) crtc->filter.priority = state->priority; crtc->filter.crtc = state->outputs[i].edid; - crtc->filter.class = PACKAGE "::redshift::standard"; crtc->filter.lifespan = lifespan; +#if defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" +#endif + crtc->filter.class = PACKAGE "::redshift::standard"; +#if defined(__GNUC__) +# pragma GCC diagnostic pop +#endif if (libcoopgamma_get_gamma_info_sync(crtc->filter.crtc, &info, &state->ctx) < 0) { int saved_errno = errno; -- cgit v1.2.3-70-g09d2