RoaringBitmap / CRoaring

Roaring bitmaps in C (and C++), with SIMD (AVX2, AVX-512 and NEON) optimizations: used by Apache Doris, ClickHouse, and StarRocks
http://roaringbitmap.org/
Other
1.54k stars 265 forks source link

getting cmocka warnings #28

Closed lemire closed 8 years ago

lemire commented 8 years ago

I am getting clobbered warnings out of cmocka.

CRoaring/tests/vendor/cmocka/cmocka.c: In function 'cmocka_run_one_test_or_fixture':
/Users/lemire/CVS/github/CBitmapCompetition/CRoaring/tests/vendor/cmocka/cmocka.c:2139:9: warning: variable 'rc' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]
     int rc = 0;
         ^~
CRoaring/tests/vendor/cmocka/cmocka.c: In function 'cmocka_run_one_test_or_fixture.constprop':
/Users/lemire/CVS/github/CBitmapCompetition/CRoaring/tests/vendor/cmocka/cmocka.c:2139:9: warning: variable 'rc' might be clobbered by 'longjmp' or 'vfork' [-Wclobbered]

Can these be safely ignored?

fsaintjacques commented 8 years ago

which compiler?

lemire commented 8 years ago

gcc 6.1

fsaintjacques commented 8 years ago

There's a 2011 reference in cmocka for this compiler warning. My guess is that gcc-6.1 got cleverer and found a new potential issue.

https://git.cryptomilk.org/projects/cmocka.git/commit/?id=c9a710f319771df5644cc8d57d5d18b98bf5f042

I'm not sure if the volatile keyword would fix the issue.

lemire commented 8 years ago

It is a small detail. I just wanted to document it.

lemire commented 8 years ago

I am going to close it for now.