Closed olegrok closed 9 months ago
What's the compiler here and the system? this is a non-issue AFAICS
What's the compiler here and the system? this is a non-issue AFAICS
GCC 13.2.0. It's easy to suppress this warning but it's better to fix it to avoid missing something useful.
Well I don't know what is there to fix, I can make the compiler shut up, but __get_cpuid_count
is guaranteed to have initialized these values. At any rate, here is GCC
$ gcc --version
gcc (GCC) 13.2.1 20230801
...
$ make
make -C src
make[1]: Entering directory '/home/heluani/Documents/code/ethereum/hashtree/src'
cc -g -fpic -c -o sha256_shani.o sha256_shani.S
cc -g -fpic -c -o sha256_avx_x16.o sha256_avx_x16.S
cc -g -fpic -c -o sha256_avx_x8.o sha256_avx_x8.S
cc -g -fpic -c -o sha256_avx_x4.o sha256_avx_x4.S
cc -g -fpic -c -o sha256_avx_x1.o sha256_avx_x1.S
cc -g -fpic -c -o sha256_sse_x1.o sha256_sse_x1.S
cc -g -Wall -Werror -c -o hashtree.o hashtree.c
ar rcs libhashtree.a sha256_shani.o sha256_avx_x16.o sha256_avx_x8.o sha256_avx_x4.o sha256_avx_x1.o sha256_sse_x1.o hashtree.o
make[1]: Leaving directory '/path/hashtree/src'
I use musl (not glibc). Maybe it matters. To suppress you can initialize a, b, c, d with zeroes. It won't change anything but just makes compiler happy.
I understand how to make the compiler shut-up, just being picky about adding inconsequential lines :smile:
Surely the problem is musl's handling of the built-in function that doesn't have the glibc annotation that it is innitializing those variables. I'll add the initialization to shut musl libc down.
@potuz Thanks for your patch! Module code is built successfully but tests still fail. I prepared a patch to fix that https://github.com/prysmaticlabs/hashtree/pull/22