[reSIProcate] War on Warnings, late snow, setting -Werror

Daniel Pocock daniel at pocock.pro
Mon May 17 11:25:03 CDT 2021



On 17/05/2021 18:18, Scott Godin wrote:
> Hi Daniel,
> 
> Great stuff.
> 
> There are still a lot of warnings in the Visual Studio build, mostly in
> the 64-bit builds with size mismatch warnings - I'm surprised these
> don't come up in GCC builds.  Are you building 64-bit?

Yes, my own workstation is POWER9 (ppc64el) and the travis-ci builds are
x86_64, it is in their logs:

GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
 OS/Arch:           linux/amd64
  OS/Arch:          linux/amd64

x86_64 is the name used in the Linux kernel and the Red Hat (RPM) world.
 amd64 is the name used in Debian and Ubuntu.  They are all the same thing.

> Example:
> 3>resip\resip\stack\SdpContents.cxx(1362,16): warning C4267: 'argument':
> conversion from 'size_t' to 'resip::Data::size_type', possible loss of data
> 
> On another note you have introduced a few new warnings for windows users:
> -one was around a missing ; in the {} scoped define
> resip_assert_not_null -  I addressed that one, and committed.
> 
> (one of these for each instance of pragma GCC):
> 3>resip\resip\stack\InterruptableStackThread.cxx(28,9): warning C4068:
> unknown pragma 'GCC'
> 
> I'm guessing these should be wrapped in #ifdefs checking for GCC first.

GCC and Clang are both giving slightly different results so I'm not
surprised that Windows / Visual Studio builds also give some other warnings.

It would be really good to kill all the warnings on Windows too.  A
warning on Windows today could be a warning in the next version of GCC
and vice-versa.

We can try to use an even more recent version of GCC and/or Clang to see
if they show some of the warnings that you see.

We can look at GCC and Clang to see if either of them can be even
stricter - they may be able to detect the warnings you mentioned.

Regards,

Daniel


More information about the resiprocate-devel mailing list