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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
From: Ole Streicher <olebole@debian.org>
Date: Tue, 9 Sep 2025 09:51:06 +0200
Subject: Add arguments to function declarations
Required for C-23 compliance.
Closes: #1096664
---
fitsy/ftacht.c | 2 +-
fitsy/ftacht2.c | 12 +++++++-----
fitsy/headfile.c | 2 +-
fitsy/headfind.c | 2 +-
gnu/sort.c | 2 +-
gnu/system.h | 2 --
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/fitsy/ftacht.c b/fitsy/ftacht.c
index b88892f..22e7f23 100644
--- a/fitsy/ftacht.c
+++ b/fitsy/ftacht.c
@@ -89,7 +89,7 @@ void ft_acht(type1, v1, type2, v2, npix, direction, hasscale, bscale, bzero)
double bscale;
double bzero;
{
- typedef void (*vector)();
+ typedef void (*vector)(void*, void*, int, int, int, double, double);
static vector matrix[10][10] = {
{ achtcc,achtcs,achtci,achtcl,achtcr,achtcd,achtct,achtcu,achtcv }
diff --git a/fitsy/ftacht2.c b/fitsy/ftacht2.c
index a4d2ec3..758b0a1 100644
--- a/fitsy/ftacht2.c
+++ b/fitsy/ftacht2.c
@@ -12,7 +12,7 @@
#include "longlong.h"
#include "generic.h"
-typedef void (*vector)();
+typedef void (*vector)(void*, void*, size_t);
#ifdef __STDC__
#define cht2xx(ch1, type1, ch2, type2) \
@@ -104,7 +104,9 @@ void ft_acht2(type1, v1, type2, v2, npix, swap, direction)
vector rtn=NULL;
int offset1, offset2, type;
-static vector matrix[10][10] = {
+ typedef void (*achtvec)(void*, void*, int, vector, int);
+
+static achtvec matrix[10][10] = {
{ cht2cc,cht2cs,cht2ci,cht2cl,cht2cr,cht2cd,cht2ct,cht2cu,cht2cv }
, { cht2sc,cht2ss,cht2si,cht2sl,cht2sr,cht2sd,cht2st,cht2su,cht2sv }
, { cht2ic,cht2is,cht2ii,cht2il,cht2ir,cht2id,cht2it,cht2iu,cht2iv }
@@ -130,13 +132,13 @@ static vector matrix[10][10] = {
rtn = (vector)memcpy;
break;
case 2:
- rtn = swap2;
+ rtn = (vector)swap2;
break;
case 4:
- rtn = swap4;
+ rtn = (vector)swap4;
break;
case 8:
- rtn = swap8;
+ rtn = (vector)swap8;
break;
default:
rtn = (vector)memcpy;
diff --git a/fitsy/headfile.c b/fitsy/headfile.c
index b80788d..c656512 100644
--- a/fitsy/headfile.c
+++ b/fitsy/headfile.c
@@ -102,7 +102,7 @@ int ft_headwrite(file, fits)
void *ft_fileparse(ifile, callback, cdata)
File ifile;
- int (*callback)();
+ int (*callback)(File, FITSHead, void *, void *);
void *cdata;
{
FITSHead fits;
diff --git a/fitsy/headfind.c b/fitsy/headfind.c
index 8095c15..04ef002 100644
--- a/fitsy/headfind.c
+++ b/fitsy/headfind.c
@@ -4,7 +4,7 @@
#include "xos.h"
#include "fitsy.h"
-extern int ft_compare();
+extern int ft_compare(const void*, const void*);
/* Find a FITS card in the header.
diff --git a/gnu/sort.c b/gnu/sort.c
index 56d8bb2..f63e466 100644
--- a/gnu/sort.c
+++ b/gnu/sort.c
@@ -83,7 +83,7 @@ typedef long long longlong;
typedef long longlong;
#endif
-static void usage ();
+static void usage (int);
#ifdef SAOMOD_TABLE
int table = 0;
diff --git a/gnu/system.h b/gnu/system.h
index 6ebebda..c12260d 100644
--- a/gnu/system.h
+++ b/gnu/system.h
@@ -106,8 +106,6 @@ extern int errno;
#ifdef STDC_HEADERS
#include <stdlib.h>
-#else
-char *getenv ();
#endif
#ifdef HAVE_FCNTL_H
|