fix void param declarations & prototypes
These should be funcname(void) rather than funcname(). Found by
searching for "() {" in C files.
Bug: aomedia:3416
Change-Id: I119133dc0fe78cfb24f072da70ca4ceea8e19431
diff --git a/aom_dsp/aom_dsp_rtcd.c b/aom_dsp/aom_dsp_rtcd.c
index 1514bd6..0265dd1 100644
--- a/aom_dsp/aom_dsp_rtcd.c
+++ b/aom_dsp/aom_dsp_rtcd.c
@@ -15,4 +15,4 @@
#include "aom_ports/aom_once.h"
-void aom_dsp_rtcd() { aom_once(setup_rtcd_internal); }
+void aom_dsp_rtcd(void) { aom_once(setup_rtcd_internal); }
diff --git a/aom_dsp/simd/v128_intrinsics_x86.h b/aom_dsp/simd/v128_intrinsics_x86.h
index 32b51c9..d20f979 100644
--- a/aom_dsp/simd/v128_intrinsics_x86.h
+++ b/aom_dsp/simd/v128_intrinsics_x86.h
@@ -79,7 +79,7 @@
#endif
#endif
-SIMD_INLINE v128 v128_zero() { return _mm_setzero_si128(); }
+SIMD_INLINE v128 v128_zero(void) { return _mm_setzero_si128(); }
SIMD_INLINE v128 v128_dup_8(uint8_t x) { return _mm_set1_epi8((char)x); }
@@ -345,7 +345,9 @@
typedef v128 sad128_internal;
-SIMD_INLINE sad128_internal v128_sad_u8_init() { return _mm_setzero_si128(); }
+SIMD_INLINE sad128_internal v128_sad_u8_init(void) {
+ return _mm_setzero_si128();
+}
/* Implementation dependent return value. Result must be finalised with
v128_sad_sum().
@@ -360,7 +362,7 @@
typedef int32_t ssd128_internal;
-SIMD_INLINE ssd128_internal v128_ssd_u8_init() { return 0; }
+SIMD_INLINE ssd128_internal v128_ssd_u8_init(void) { return 0; }
/* Implementation dependent return value. Result must be finalised with
* v128_ssd_sum(). */
@@ -612,7 +614,7 @@
typedef v128 sad128_internal_u16;
-SIMD_INLINE sad128_internal_u16 v128_sad_u16_init() { return v128_zero(); }
+SIMD_INLINE sad128_internal_u16 v128_sad_u16_init(void) { return v128_zero(); }
/* Implementation dependent return value. Result must be finalised with
* v128_sad_u16_sum(). */
@@ -638,7 +640,7 @@
typedef v128 ssd128_internal_s16;
-SIMD_INLINE ssd128_internal_s16 v128_ssd_s16_init() { return v128_zero(); }
+SIMD_INLINE ssd128_internal_s16 v128_ssd_s16_init(void) { return v128_zero(); }
/* Implementation dependent return value. Result must be finalised with
* v128_ssd_s16_sum(). */
diff --git a/aom_dsp/simd/v256_intrinsics_c.h b/aom_dsp/simd/v256_intrinsics_c.h
index 66cfda3..60d0d53 100644
--- a/aom_dsp/simd/v256_intrinsics_c.h
+++ b/aom_dsp/simd/v256_intrinsics_c.h
@@ -95,7 +95,7 @@
c_v256_store_unaligned(p, a);
}
-SIMD_INLINE c_v256 c_v256_zero() {
+SIMD_INLINE c_v256 c_v256_zero(void) {
c_v256 t;
t.u64[3] = t.u64[2] = t.u64[1] = t.u64[0] = 0;
return t;
@@ -176,7 +176,7 @@
typedef uint32_t c_ssd256_internal;
-SIMD_INLINE c_ssd256_internal c_v256_ssd_u8_init() { return 0; }
+SIMD_INLINE c_ssd256_internal c_v256_ssd_u8_init(void) { return 0; }
/* Implementation dependent return value. Result must be finalised with
* v256_ssd_u8_sum(). */
@@ -929,7 +929,7 @@
typedef uint32_t c_sad256_internal_u16;
-SIMD_INLINE c_sad256_internal_u16 c_v256_sad_u16_init() { return 0; }
+SIMD_INLINE c_sad256_internal_u16 c_v256_sad_u16_init(void) { return 0; }
/* Implementation dependent return value. Result must be finalised with
v256_sad_u16_sum(). */
@@ -945,7 +945,7 @@
typedef uint64_t c_ssd256_internal_s16;
-SIMD_INLINE c_ssd256_internal_s16 c_v256_ssd_s16_init() { return 0; }
+SIMD_INLINE c_ssd256_internal_s16 c_v256_ssd_s16_init(void) { return 0; }
/* Implementation dependent return value. Result must be finalised with
* v256_ssd_s16_sum(). */
diff --git a/aom_scale/aom_scale_rtcd.c b/aom_scale/aom_scale_rtcd.c
index a04e053..93def35 100644
--- a/aom_scale/aom_scale_rtcd.c
+++ b/aom_scale/aom_scale_rtcd.c
@@ -15,4 +15,4 @@
#include "aom_ports/aom_once.h"
-void aom_scale_rtcd() { aom_once(setup_rtcd_internal); }
+void aom_scale_rtcd(void) { aom_once(setup_rtcd_internal); }
diff --git a/aom_util/debug_util.c b/aom_util/debug_util.c
index 7b24550..d0792e3 100644
--- a/aom_util/debug_util.c
+++ b/aom_util/debug_util.c
@@ -108,7 +108,7 @@
static int frame_stride = MAX_FRAME_STRIDE;
static int frame_height = MAX_FRAME_HEIGHT;
static int frame_size = MAX_FRAME_STRIDE * MAX_FRAME_HEIGHT;
-void mismatch_move_frame_idx_w() {
+void mismatch_move_frame_idx_w(void) {
frame_buf_idx_w = (frame_buf_idx_w + 1) % max_frame_buf_num;
if (frame_buf_idx_w == frame_buf_idx_r) {
printf("frame_buf overflow\n");
@@ -125,7 +125,7 @@
}
}
-void mismatch_move_frame_idx_r() {
+void mismatch_move_frame_idx_r(void) {
if (frame_buf_idx_w == frame_buf_idx_r) {
printf("frame_buf underflow\n");
assert(0);
diff --git a/av1/common/av1_rtcd.c b/av1/common/av1_rtcd.c
index c484166..8a35dca 100644
--- a/av1/common/av1_rtcd.c
+++ b/av1/common/av1_rtcd.c
@@ -15,4 +15,4 @@
#include "aom_ports/aom_once.h"
-void av1_rtcd() { aom_once(setup_rtcd_internal); }
+void av1_rtcd(void) { aom_once(setup_rtcd_internal); }
diff --git a/av1/common/restoration.c b/av1/common/restoration.c
index 7eb48c2..0be126f 100644
--- a/av1/common/restoration.c
+++ b/av1/common/restoration.c
@@ -90,7 +90,7 @@
// Index 1 corresponds to r[1], e[1]
int sgrproj_mtable[SGRPROJ_PARAMS][2];
-static void GenSgrprojVtable() {
+static void GenSgrprojVtable(void) {
for (int i = 0; i < SGRPROJ_PARAMS; ++i) {
const sgr_params_type *const params = &av1_sgr_params[i];
for (int j = 0; j < 2; ++j) {
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index b687cf9..0e31ce9 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -76,7 +76,7 @@
return 0;
}
-static uint32_t read_temporal_delimiter_obu() { return 0; }
+static uint32_t read_temporal_delimiter_obu(void) { return 0; }
// Returns a boolean that indicates success.
static int read_bitstream_level(AV1_LEVEL *seq_level_idx,
diff --git a/examples/aom_cx_set_ref.c b/examples/aom_cx_set_ref.c
index da36d9f..b7fb7bc 100644
--- a/examples/aom_cx_set_ref.c
+++ b/examples/aom_cx_set_ref.c
@@ -61,7 +61,7 @@
static const char *exec_name;
-void usage_exit() {
+void usage_exit(void) {
fprintf(stderr,
"Usage: %s <codec> <width> <height> <infile> <outfile> "
"<frame> <limit(optional)>\n",
diff --git a/examples/inspect.c b/examples/inspect.c
index ed77b5d..e285be0 100644
--- a/examples/inspect.c
+++ b/examples/inspect.c
@@ -742,7 +742,7 @@
aom_free(buffer);
}
-void ifd_init_cb() {
+void ifd_init_cb(void) {
aom_inspect_init ii;
ii.inspect_cb = inspect;
ii.inspect_ctx = NULL;
@@ -775,7 +775,7 @@
size_t frame_size = 0;
EMSCRIPTEN_KEEPALIVE
-int read_frame() {
+int read_frame(void) {
img = NULL;
// This loop skips over any frames that are show_existing_frames, as
@@ -824,16 +824,18 @@
}
EMSCRIPTEN_KEEPALIVE
-const char *get_aom_codec_build_config() { return aom_codec_build_config(); }
+const char *get_aom_codec_build_config(void) {
+ return aom_codec_build_config();
+}
EMSCRIPTEN_KEEPALIVE
-int get_bit_depth() { return img->bit_depth; }
+int get_bit_depth(void) { return img->bit_depth; }
EMSCRIPTEN_KEEPALIVE
-int get_bits_per_sample() { return img->bps; }
+int get_bits_per_sample(void) { return img->bps; }
EMSCRIPTEN_KEEPALIVE
-int get_image_format() { return img->fmt; }
+int get_image_format(void) { return img->fmt; }
EMSCRIPTEN_KEEPALIVE
unsigned char *get_plane(int plane) { return img->planes[plane]; }
@@ -848,10 +850,10 @@
int get_plane_height(int plane) { return aom_img_plane_height(img, plane); }
EMSCRIPTEN_KEEPALIVE
-int get_frame_width() { return info->frame_width; }
+int get_frame_width(void) { return info->frame_width; }
EMSCRIPTEN_KEEPALIVE
-int get_frame_height() { return info->frame_height; }
+int get_frame_height(void) { return info->frame_height; }
static void parse_args(char **argv) {
char **argi, **argj;
@@ -949,7 +951,7 @@
}
EMSCRIPTEN_KEEPALIVE
-void quit() {
+void quit(void) {
if (aom_codec_destroy(&codec)) die_codec(&codec, "Failed to destroy codec");
aom_video_reader_close(reader);
}
diff --git a/tools/auto_refactor/c_files/decl_status_code.c b/tools/auto_refactor/c_files/decl_status_code.c
index bd445ab..a444553 100644
--- a/tools/auto_refactor/c_files/decl_status_code.c
+++ b/tools/auto_refactor/c_files/decl_status_code.c
@@ -13,17 +13,17 @@
int x;
} T1;
-int parse_decl_node_2() { int arr[3]; }
+int parse_decl_node_2(void) { int arr[3]; }
-int parse_decl_node_3() { int *a; }
+int parse_decl_node_3(void) { int *a; }
-int parse_decl_node_4() { T1 t1[3]; }
+int parse_decl_node_4(void) { T1 t1[3]; }
-int parse_decl_node_5() { T1 *t2[3]; }
+int parse_decl_node_5(void) { T1 *t2[3]; }
-int parse_decl_node_6() { T1 t3[3][3]; }
+int parse_decl_node_6(void) { T1 t3[3][3]; }
-int main() {
+int main(void) {
int a;
T1 t1;
struct S1 s1;
diff --git a/tools/auto_refactor/c_files/func_in_out.c b/tools/auto_refactor/c_files/func_in_out.c
index 67ab58d..7f37bba 100644
--- a/tools/auto_refactor/c_files/func_in_out.c
+++ b/tools/auto_refactor/c_files/func_in_out.c
@@ -199,7 +199,7 @@
for (int i = 0; i < 10; ++i) cpi->y--;
}
-int main() {
+int main(void) {
int x;
VP9_COMP cpi;
RD rd;
diff --git a/tools/auto_refactor/c_files/parse_lvalue.c b/tools/auto_refactor/c_files/parse_lvalue.c
index 97113ef..fa44d72 100644
--- a/tools/auto_refactor/c_files/parse_lvalue.c
+++ b/tools/auto_refactor/c_files/parse_lvalue.c
@@ -39,7 +39,7 @@
return 0;
}
-int main() {
+int main(void) {
int x = 0;
VP9_COMP cpi;
func(&cpi, x);
diff --git a/tools/auto_refactor/c_files/simple_code.c b/tools/auto_refactor/c_files/simple_code.c
index dd89a15..902cd1d 100644
--- a/tools/auto_refactor/c_files/simple_code.c
+++ b/tools/auto_refactor/c_files/simple_code.c
@@ -48,11 +48,11 @@
c(1);
return 0;
}
-int e() {
+int e(void) {
c(0);
return 0;
}
-int main() {
+int main(void) {
int p = 3;
S s;
s.x = p + 1;
diff --git a/tools/auto_refactor/c_files/struct_code.c b/tools/auto_refactor/c_files/struct_code.c
index e14372c..7f24d41 100644
--- a/tools/auto_refactor/c_files/struct_code.c
+++ b/tools/auto_refactor/c_files/struct_code.c
@@ -46,4 +46,4 @@
} z;
} T7;
-int main() {}
+int main(void) {}