jenkins-minimal-perfect-hash
jenkins-minimal-perfect-hash copied to clipboard
fix warnings in testperf.c
the testperf.c has several warnings on my 64bit Mac machine:
cc -O -c -o testperf.o testperf.c
testperf.c:108:25: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
hash = mph_test_s((char*)hash, mykey->klen);
^
testperf.c:112:23: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
hash = mph_test((char*)hash);
^
testperf.c:112:23: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
testperf.c:116:23: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
hash = mph_test((char*)hash);
^
testperf.c:116:23: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
testperf.c:120:25: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
hash = mph_test_s((char*)a,b);
^
testperf.c:124:25: warning: cast to 'char *' from smaller integer type 'uint32_t' (aka 'unsigned int') [-Wint-to-pointer-cast]
hash = mph_test_s((char*)a,b);
^
7 warnings generated.
this pr fixed these warnings.