aboutsummaryrefslogtreecommitdiffstats
path: root/src/gamma-coopgamma.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-05 20:59:57 +0100
committerMattias Andrée <m@maandree.se>2025-03-05 20:59:57 +0100
commit259604f63dba5f958b879813d1eaed9a59991d1e (patch)
tree15aec3fced6f925fb3dd9d6c5907cf5aaa2a22d0 /src/gamma-coopgamma.c
parentMention after fork that SIGCHLD is ignored (diff)
downloadredshift-ng-259604f63dba5f958b879813d1eaed9a59991d1e.tar.gz
redshift-ng-259604f63dba5f958b879813d1eaed9a59991d1e.tar.bz2
redshift-ng-259604f63dba5f958b879813d1eaed9a59991d1e.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src/gamma-coopgamma.c')
-rw-r--r--src/gamma-coopgamma.c18
1 files changed, 15 insertions, 3 deletions
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;