From: Vitaly Chikunov Date: Wed, 28 Oct 2020 21:58:56 +0000 (+0300) Subject: CMakeLists.txt: Fix warning on gcc-9 X-Git-Tag: v3.0.0~58 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=6c7addf78b7fe7c8841d4cda6c9d710e4992c7a6;p=openssl-gost%2Fengine.git CMakeLists.txt: Fix warning on gcc-9 /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:4:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types] 4 | int *p = buf + 1; | ^~~ /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:5:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types] 5 | int *q = buf + 2; | ^~~ Reported-by: Ilya Shipitsin Fixes: #288 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b7b7938..d6e5606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,8 +69,8 @@ endif() check_c_source_runs(" int main(void) { char buf[16] = { 0, 1, 2 }; - int *p = buf + 1; - int *q = buf + 2; + int *p = (int *)(buf + 1); + int *q = (int *)(buf + 2); return (*p == *q); } " RELAXED_ALIGNMENT)