GCC considers declarations using a parameter of pointer type (or equivalently a parameter using an array of unspecified dimensions) to be inconsistent with a declaration using a known-length array type and emits a -Warray-parameter warning for several ff_j_rev_dct* functions for this. This patch makes the declarations match the actual definitions to suppress these (IMO nonsensical) warnings.
Unified · Split
| @@ -27,11 +27,11 @@ · 26 unmodified lines | |||
| 27 | #include <stddef.h> | 27 | #include <stddef.h> |
| 28 | #include <stdint.h> | 28 | #include <stdint.h> |
| 29 | 29 | ||
| 30 | void ff_j_rev_dct(int16_t *data); | 30 | void ff_j_rev_dct(int16_t data[64]); |
| 31 | void ff_j_rev_dct4(int16_t *data); | 31 | void ff_j_rev_dct4(int16_t data[64]); |
| 32 | void ff_j_rev_dct2(int16_t *data); | 32 | void ff_j_rev_dct2(int16_t data[64]); |
| 33 | void ff_j_rev_dct1(int16_t *data); | 33 | void ff_j_rev_dct1(int16_t data[64]); |
| 34 | void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block); | 34 | void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); |
| 35 | void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block); | 35 | void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]); |
| 36 | 36 | ||
| 37 | #endif /* AVCODEC_DCT_H */ | 37 | #endif /* AVCODEC_DCT_H */ |
| @@ -1159,13 +1159,13 @@ void ff_j_rev_dct1(DCTBLOCK data){ · 1158 unmodified lines | |||
| 1159 | #undef FIX | 1159 | #undef FIX |
| 1160 | #undef CONST_BITS | 1160 | #undef CONST_BITS |
| 1161 | 1161 | ||
| 1162 | void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t *block) | 1162 | void ff_jref_idct_put(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]) |
| 1163 | { | 1163 | { |
| 1164 | ff_j_rev_dct(block); | 1164 | ff_j_rev_dct(block); |
| 1165 | ff_put_pixels_clamped_c(block, dest, line_size); | 1165 | ff_put_pixels_clamped_c(block, dest, line_size); |
| 1166 | } | 1166 | } |
| 1167 | 1167 | ||
| 1168 | void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t *block) | 1168 | void ff_jref_idct_add(uint8_t *dest, ptrdiff_t line_size, int16_t block[64]) |
| 1169 | { | 1169 | { |
| 1170 | ff_j_rev_dct(block); | 1170 | ff_j_rev_dct(block); |
| 1171 | ff_add_pixels_clamped_c(block, dest, line_size); | 1171 | ff_add_pixels_clamped_c(block, dest, line_size); |