Closed hamnaz closed 4 years ago
-std=c99 oh y, i often use aligned_alloc() (C2011) but I have stated C1999 compatibility. In this program, automatic alignment of the allocated memory does not matter, let's switch to the classic calloc(). fixed in 0.23
check this area
if !ALLOC_ALIGN
gcc-8 -std=c99 -O2 -I secp256k1/src/ -I secp256k1/ k022.c -lgmp -lm -o k022 k022.c: In function ‘main’: k022.c:740:40: warning: implicit declaration of function ‘aligned_alloc’; did you mean ‘checked_malloc’? [-Wimplicit-function-declaration] hashtb_entry DPht = (hashtb_entry ) aligned_alloc( 4, HASH_SIZE sizeof(struct hashtb_entry) ); //C11 ^
~~~~ checked_malloc k022.c:740:23: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] hashtb_entry DPht = (hashtb_entry ) aligned_alloc( 4, HASH_SIZE sizeof(struct hashtb_entry) ); //C11 ^