jenkins-minimal-perfect-hash icon indicating copy to clipboard operation
jenkins-minimal-perfect-hash copied to clipboard

fix warnings in testperf.c

Open starwing opened this issue 4 years ago • 0 comments

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.

starwing avatar Apr 18 '20 03:04 starwing