Skip to content

Commit 5c409e3

Browse files
committed
Replace more K&R style argument definition by C23-compatible style
Found by Clang 20.
1 parent ce616b6 commit 5c409e3

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

src/GFIR/rounding.c

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ int csd2int(int cprec, int *code);
1717

1818
/* ************************************************************************
1919
************************************************************************ */
20-
void round2int(a, b, n, cprec)
21-
double *a, *b;
22-
int n, cprec;
20+
void round2int(double *a, double *b, int n, int cprec)
2321
{
2422
int i,k;
2523

@@ -32,10 +30,8 @@ int n, cprec;
3230

3331
/* ************************************************************************
3432
************************************************************************ */
35-
void round2csd(a, b, n, cprec, csdprec, bincode, csdcode, csdcoder)
36-
double *a, *b;
37-
int n, cprec, csdprec;
38-
int **bincode, **csdcode, **csdcoder;
33+
void round2csd(double *a, double *b, int n, int cprec, int csdprec,
34+
int **bincode, int **csdcode, int **csdcoder)
3935
{
4036
int i,k, ia;
4137

@@ -118,8 +114,7 @@ void printcode(int ** code, int n, int cprec)
118114
/* ************************************************************************
119115
Print CSD code in the form of two common sub-expressions sharing
120116
************************************************************************ */
121-
void print_cses_code(xpx, xmx, x, n, cprec)
122-
int **xpx, **xmx, **x, n, cprec;
117+
void print_cses_code(int **xpx, int **xmx, int **x, int n, int cprec)
123118
{
124119
int i, j;
125120
int symmetry;
@@ -193,14 +188,14 @@ int **xpx, **xmx, **x, n, cprec;
193188
}
194189

195190
/* ************************************************************************
191+
* int a Input integer to be converted into CSD code
192+
* int cprec Integer precision
193+
* int csdprec CSD precistion
194+
* int *bincode Binary code
195+
* int *csdcode CSD code
196+
* int *csdcoder CSD code rounded to 'csdprec' nonzero bits
196197
************************************************************************ */
197-
void int2csd(a, cprec, csdprec, bincode, csdcode, csdcoder)
198-
int a; /* Input integer to be converted into CSD code */
199-
int cprec; /* Integer precision */
200-
int csdprec; /* CSD precistion */
201-
int *bincode; /* Binary code */
202-
int *csdcode; /* CSD code */
203-
int *csdcoder; /* CSD code rounded to 'csdprec' nonzero bits */
198+
void int2csd(int a, int cprec, int csdprec, int *bincode, int *csdcode, int *csdcoder)
204199
{
205200
int i, sign, ci, ci1, nzeroes;
206201

@@ -243,8 +238,7 @@ int *csdcoder; /* CSD code rounded to 'csdprec' nonzero bits */
243238

244239
/* ************************************************************************
245240
************************************************************************ */
246-
int csd2int(cprec, code)
247-
int cprec, *code;
241+
int csd2int(int cprec, int *code)
248242
{
249243
int i, a;
250244

@@ -257,9 +251,7 @@ int cprec, *code;
257251
/* ************************************************************************
258252
Extract x+x>>2 and x-x>>2 subexpressions from the CSD code
259253
************************************************************************ */
260-
void csesh(code, n, cprec, xpx, xmx, x )
261-
int n, cprec;
262-
int **code, **xpx, **xmx, **x;
254+
void csesh(int **code, int n, int cprec, int **xpx, int **xmx, int **x)
263255
{
264256
int i, k;
265257

0 commit comments

Comments
 (0)