aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Chikunov <vt@altlinux.org>2020-10-29 00:58:56 +0300
committerDmitry Belyavskiy <beldmit@gmail.com>2020-10-29 09:57:09 +0300
commitca0646fce4b739c83f2501ec26968919467074d8 (patch)
tree94975305ae989c99e62291f6d82bb57ca9aa85b4
parentb8ede042a2dcc26c96d0f41b57ef5fd205f55d64 (diff)
downloadgost-engine-ca0646fce4b739c83f2501ec26968919467074d8.zip
gost-engine-ca0646fce4b739c83f2501ec26968919467074d8.tar.gz
gost-engine-ca0646fce4b739c83f2501ec26968919467074d8.tar.bz2
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 <https://github.com/chipitsine> Fixes: #288 (cherry picked from commit 6c7addf78b7fe7c8841d4cda6c9d710e4992c7a6)
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 112bbec..e6337c9 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)