1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
Description: Fix build with GCC-15
Author: Omar Zagonel El Laden <omarzladen@gmail.com>
Bug-Debian: https://bugs.debian.org/1098119
Reviewed-by: Daniel Lenharo de Souza <lenharo@debian.org>
Last-Update: 2025-11-08
--- xarclock-1.0.orig/ARClock.c
+++ xarclock-1.0/ARClock.c
@@ -61,9 +61,9 @@ SOFTWARE.
#endif
#ifdef X_NOT_STDC_ENV
-extern struct tm *localtime();
+extern struct tm *localtime(Time_t *);
#define Time_t long
-extern Time_t time ();
+extern Time_t time (Time_t *);
extern double round();
#else
#include <time.h>
@@ -74,10 +74,14 @@ extern double round();
#include <X11/extensions/XKBbells.h>
#endif
-static void clock_tic(), DrawHand(), DrawSecond(), SetSeg(), DrawClockFace();
-static void erase_hands();
+static void clock_tic(XtPointer, XtIntervalId *);
+static void DrawHand(ClockWidget, Dimension, Dimension, int);
+static void DrawSecond(ClockWidget, Dimension, Dimension, Dimension, int);
+static void SetSeg(ClockWidget, int, int, int, int);
+static void DrawClockFace(ClockWidget);
+static void erase_hands(ClockWidget, struct tm *);
static int iround(double x);
-
+
/* Private Definitions */
#define VERTICES_IN_HANDS 6 /* to draw triangle */
@@ -144,8 +148,12 @@ static XtResource resources[] = {
#undef goffset
static void ClassInitialize();
-static void Initialize(), Realize(), Destroy(), Resize(), Redisplay();
-static Boolean SetValues();
+static void Initialize(Widget, Widget, ArgList, Cardinal *);
+static void Realize(Widget, XtValueMask*, XSetWindowAttributes*);
+static void Destroy(Widget);
+static void Resize(Widget);
+static void Redisplay(Widget, XEvent *, Region);
+static Boolean SetValues(Widget, Widget, Widget, ArgList, Cardinal *);
ClockClassRec clockClassRec = {
{ /* core fields */
@@ -370,8 +378,8 @@ static void clock_tic(client_data, id)
* Jaime Garcia Ghirelli: */
register int i, j;
double angle, x, y;
- double cos();
- double sin();
+ double cos(double);
+ double sin(double);
static String arabic_roman_numbers[]=
{ "9", "10", "11", "12", "1", "2", "3", "4", "5", "6", "7", "8",
"3", "2", "1", "12", "11", "10", "9", "8", "7", "6", "5", "4",
--- xarclock-1.0.orig/xarclock.c
+++ xarclock-1.0/xarclock.c
@@ -47,7 +47,7 @@ in this Software without prior written a
#include <X11/extensions/XKBbells.h>
#endif
-extern void exit();
+extern void exit(int);
/* Command line options table. Only resources are entered here...there is a
pass over the remaining options after XtParseCommand is let loose. */
@@ -73,7 +73,7 @@ static XrmOptionDescRec options[] = {
};
-static void quit();
+static void quit(Widget, XEvent *, String*, Cardinal *);
static XtActionsRec xclock_actions[] = {
{ "quit", quit },
};
|