[PATCH dockapps 4/4] wmtime: fix type of arguments to `localtime(3)`

2 views
Skip to first unread message

Jeremy Sowden

unread,
Dec 24, 2024, 10:56:05 AM12/24/24
to Window Maker Dev
With recent versions of gcc, on architectures where `long` and `time_t` are not
the same size, passing pointers to `long` to `localtime(3)`, leads to
"incompatible pointer type" errors. Use `time_t` instead.

Link: https://bugs.debian.org/1091285
Signed-off-by: Jeremy Sowden <jer...@azazel.net>
---
wmtime/wmtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wmtime/wmtime.c b/wmtime/wmtime.c
index 70f7cad1ed9e..3ba976d2e96c 100644
--- a/wmtime/wmtime.c
+++ b/wmtime/wmtime.c
@@ -282,8 +282,8 @@ void wmtime_routine(int argc, char **argv) {

struct tm *time_struct;

- long starttime;
- long curtime;
+ time_t starttime;
+ time_t curtime;

char *conffile = NULL;

--
2.45.2

Reply all
Reply to author
Forward
0 new messages