[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-Werror=strict-overflow induced build failures


Hi libssh list,

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?

Thanks,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@xxxxxxxxxx - tel: +972.52.368.4656, http://www.tkos.co.il -

Archive administrator: postmaster@lists.cynapses.org