aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-08 13:44:00 +0100
committerMattias Andrée <m@maandree.se>2025-03-08 13:44:00 +0100
commitc18006147ed0ffba6144c25e564aa95c4dbba99a (patch)
tree89d3ce8cc2ea7cd6450c54f05425f671396f26fa /src
parentRemove near empty translation sets (diff)
downloadredshift-ng-c18006147ed0ffba6144c25e564aa95c4dbba99a.tar.gz
redshift-ng-c18006147ed0ffba6144c25e564aa95c4dbba99a.tar.bz2
redshift-ng-c18006147ed0ffba6144c25e564aa95c4dbba99a.tar.xz
Fix warnings
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'src')
-rw-r--r--src/common.h12
-rw-r--r--src/gamma-randr.c2
-rw-r--r--src/location-geoclue2.c11
-rw-r--r--src/options.c4
4 files changed, 22 insertions, 7 deletions
diff --git a/src/common.h b/src/common.h
index 4ac8b53..0b89b8f 100644
--- a/src/common.h
+++ b/src/common.h
@@ -81,7 +81,9 @@
#define N_(s) s
-#if defined(__GNUC__)
+#if defined(__clang__)
+# pragma clang diagnostic ignored "-Wunsafe-buffer-usage" /* broken in clang 19.1.7 */
+#elif defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wunsuffixed-float-constants"
#endif
@@ -394,10 +396,10 @@ void hooks_signal_period_change(enum period prev_period, enum period period);
/**
* Create a pipe(7) where both ends have O_NONBLOCK applied
*
- * @param Output parameter for the pipe's file descriptors:
- * 0) reading file descriptor, and
- * 1) writing file descriptor.
- * @return 0 on success, -1 on failure
+ * @param pipefds Output parameter for the pipe's file descriptors:
+ * 0) reading file descriptor, and
+ * 1) writing file descriptor.
+ * @return 0 on success, -1 on failure
*/
int pipeutils_create_nonblocking(int pipefds[2]);
diff --git a/src/gamma-randr.c b/src/gamma-randr.c
index 00fdc0c..35171c0 100644
--- a/src/gamma-randr.c
+++ b/src/gamma-randr.c
@@ -338,7 +338,7 @@ randr_set_temperature_for_crtc(struct gamma_state *state, int crtc_num,
if (crtc_num >= state->crtc_count || crtc_num < 0) {
if (state->crtc_count > 1)
- weprintf(_("CRTC %i does not exist, valid CRTCs are [0, %i]."), crtc_num, state->crtc_count-1);
+ weprintf(_("CRTC %i does not exist, valid CRTCs are [0, %i]."), crtc_num, (int)state->crtc_count - 1);
else
weprintf(_("CRTC %i does not exist, only CRTC 0 exists."), crtc_num);
diff --git a/src/location-geoclue2.c b/src/location-geoclue2.c
index f5076c5..5e66465 100644
--- a/src/location-geoclue2.c
+++ b/src/location-geoclue2.c
@@ -19,9 +19,20 @@
*/
#include "common.h"
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wreserved-identifier"
+# pragma clang diagnostic ignored "-Wreserved-macro-identifier"
+# pragma clang diagnostic ignored "-Wdocumentation-unknown-command"
+# pragma clang diagnostic ignored "-Wdocumentation"
+# pragma clang diagnostic ignored "-Wpadded"
+#endif
#include <glib.h>
#include <glib/gprintf.h>
#include <gio/gio.h>
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
#define DBUS_ACCESS_ERROR "org.freedesktop.DBus.Error.AccessDenied"
diff --git a/src/options.c b/src/options.c
index c25eb03..7a7fb01 100644
--- a/src/options.c
+++ b/src/options.c
@@ -216,8 +216,10 @@ print_method_list(void)
static void
print_provider_list(void)
{
+ size_t i;
+
fputs(_("Available location providers:\n"), stdout);
- for (int i = 0; location_providers[i]; i++) {
+ for (i = 0; location_providers[i]; i++) {
printf(" %s\n", location_providers[i]->name);
}