Skip to content

Commit 07eea54

Browse files
Add void to signatures of argumentless functions
This fixes pedantic compiler warnings of the form: pffft.h:197:22: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes] 197 | int pffft_simd_size(); | ^ | void
1 parent 94ab251 commit 07eea54

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pffft.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,10 @@ extern "C" {
194194
void pffft_zconvolve_no_accu(PFFFT_Setup *setup, const float *dft_a, const float *dft_b, float *dft_ab, float scaling);
195195

196196
/* return 4 or 1 wether support SSE/NEON/Altivec instructions was enabled when building pffft.c */
197-
int pffft_simd_size();
197+
int pffft_simd_size(void);
198198

199199
/* return string identifier of used architecture (SSE/NEON/Altivec/..) */
200-
const char * pffft_simd_arch();
200+
const char * pffft_simd_arch(void);
201201

202202

203203
/* following functions are identical to the pffftd_ functions */

pffft_priv_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
#endif
7070

7171

72-
int FUNC_SIMD_SIZE() { return SIMD_SZ; }
72+
int FUNC_SIMD_SIZE(void) { return SIMD_SZ; }
7373

7474
int FUNC_MIN_FFT_SIZE(pffft_transform_t transform) {
7575
/* unfortunately, the fft size must be a multiple of 16 for complex FFTs
@@ -109,7 +109,7 @@ int FUNC_NEAREST_SIZE(int N, pffft_transform_t cplx, int higher) {
109109
return N;
110110
}
111111

112-
const char * FUNC_SIMD_ARCH() { return VARCH; }
112+
const char * FUNC_SIMD_ARCH(void) { return VARCH; }
113113

114114

115115
/*
@@ -1819,7 +1819,7 @@ void FUNC_TRANSFORM_ORDERED(SETUP_STRUCT *setup, const float *input, float *outp
18191819
#define assertv4(v,f0,f1,f2,f3) assert(v.f[0] == (f0) && v.f[1] == (f1) && v.f[2] == (f2) && v.f[3] == (f3))
18201820

18211821
/* detect bugs with the vector support macros */
1822-
void FUNC_VALIDATE_SIMD_A() {
1822+
void FUNC_VALIDATE_SIMD_A(void) {
18231823
float f[16] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 };
18241824
v4sf_union a0, a1, a2, a3, t, u;
18251825
memcpy(a0.f, f, 4*sizeof(float));

0 commit comments

Comments
 (0)