Skip to content

Commit 58dc0aa

Browse files
committed
Refactor simd/conf.rb - compiler warnings
Suppress warnings for old style function definition and unused variable.
1 parent 8e77532 commit 58dc0aa

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ext/json/ext/simd/conf.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
if have_header('arm_neon.h')
44
have_type('uint8x16_t', headers=['arm_neon.h']) && try_compile(<<~'SRC')
55
#include <arm_neon.h>
6-
int main() {
6+
int main(int argc, char **argv) {
77
uint8x16_t test = vdupq_n_u8(32);
8+
if (argc > 100000) printf("%p", &test);
89
return 0;
910
}
1011
SRC
@@ -14,8 +15,9 @@
1415

1516
if have_header('x86intrin.h') && have_type('__m128i', headers=['x86intrin.h']) && try_compile(<<~'SRC')
1617
#include <x86intrin.h>
17-
int main() {
18+
int main(int argc, char **argv) {
1819
__m128i test = _mm_set1_epi8(32);
20+
if (argc > 100000) printf("%p", &test);
1921
return 0;
2022
}
2123
SRC

0 commit comments

Comments
 (0)