Page MenuHomePhabricator

0.9.0 gcc compiler warnings incompatible-pointer-types
Closed, ResolvedPublic

Description

See https://travis-ci.org/ashkulz/NppFTP/jobs/560082157 (mingw 7.2 on ubuntu 18.04 bionic x64):

Probably due to

static void aes_ctr_encrypt(struct ssh_cipher_struct *cipher, void *in, void *out,
    unsigned long len) {

usage of unsigned long for param len instead of size_t in libcrypto.c.

[ 45%] Building C object src/CMakeFiles/ssh_shared.dir/libcrypto.c.obj
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:950:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .encrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:950:16: note: (near initialization for ‘ssh_ciphertab[0].encrypt’)
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:951:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .decrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:951:16: note: (near initialization for ‘ssh_ciphertab[0].decrypt’)
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:961:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .encrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:961:16: note: (near initialization for ‘ssh_ciphertab[1].encrypt’)
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:962:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .decrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:962:16: note: (near initialization for ‘ssh_ciphertab[1].decrypt’)
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:972:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .encrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:972:16: note: (near initialization for ‘ssh_ciphertab[2].encrypt’)
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:973:16: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
     .decrypt = aes_ctr_encrypt,
                ^~~~~~~~~~~~~~~
/home/travis/build/ashkulz/NppFTP/x64/obj/libssh/src/libcrypto.c:973:16: note: (near initialization for ‘ssh_ciphertab[2].decrypt’)

Event Timeline

chcg created this task.Jul 17 2019, 7:34 PM
chcg updated the task description. (Show Details)Jul 17 2019, 7:37 PM
chcg renamed this task from 0.9.0 compiler warnings to 0.9.0 gcc compiler warnings incompatible-pointer-types.Jul 17 2019, 7:41 PM
chcg updated the task description. (Show Details)
Jakuje added a subscriber: Jakuje.Jul 25 2019, 12:08 PM

You are probably right, Can you try with the following patch:

https://gitlab.com/jjelen/libssh-mirror/commit/d0e2f03e

Jakuje closed this task as Resolved.Aug 1 2019, 3:03 PM
Jakuje claimed this task.