Hi Andreas,
On Fri, Dec 07 2018, Baruch Siach wrote:
> It looks like the recently introduced gcc -Werror=strict-overflow is
> causing build issues. Here is one from gcc 5.5.0:
>
> .../libssh-0.8.4/src/buffer.c:1229:16: error: assuming signed overflow does
> not occur when simplifying conditional to constant [-Werror=strict-overflow]
> if (argc == -1){
> ^
>
>
> http://autobuild.buildroot.net/results/929/9295e5a19be20a66c8406a515a3942131a2a8e9d/build-end.log
>
> This is another one using gcc 6.4.0:
>
> .../libssh-0.8.4/src/connect.c:514:7: error: assuming signed overflow does
> not occur when simplifying conditional to constant [-Werror=strict-overflow]
> if(j != 0)
> ^
>
>
> http://autobuild.buildroot.net/results/7f8/7f89ad91766fa5fa718255da90afb8823325e1e5/build-end.log
>
> Any idea how to solve that?
Commits c306a693f3fbe and 58113d489eecf fix both issues. Thanks.
Older gcc version 4.8 still fails to build libssh due to this warning:
.../libssh-0.8.6/src/pki_gcrypt.c: In function 'privatekey_string_to_buffer':
.../libssh-0.8.6/src/pki_gcrypt.c:485:10: error: assuming signed overflow does
not occur when simplifying conditional to constant [-Werror=strict-overflow]
while(len > 0 && strncmp(p, header_end, header_end_size) != 0) {
^
Is gcc version 4.8 a supported compiler for libssh?
Thanks,
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- [email protected] - tel: +972.52.368.4656, http://www.tkos.co.il -