Compilation warnings on FreeBSD 8.x #1547

issue grarpamp opened this issue on July 2, 2012
  1. grarpamp commented at 1:15 AM on July 2, 2012: none

    I see bitcoin project trying to go -Wall (and related) free, POSIX, etc. So here are two from the unmodified 0.6.x branch (and likely master) that can be fixed...

    net.cpp: In function 'bool GetMyExternalIP(CNetAddr&)': net.cpp:191: warning: 'pszKeyword' may be used uninitialized in this function net.cpp:190: warning: 'pszGet' may be used uninitialized in this function

    I presume this applies to FreeBSD 9.x too. Thanks.

  2. gmaxwell commented at 2:19 AM on July 2, 2012: contributor

    for (int nHost = 1; nHost <= 2; nHost++) if (nHost == 1) { pszGet= pszKeyword= } else if (nHost == 2) { pszGet = pszKeyword = }

    Value analysis in your compiler is obviously deficient. Is that an old version of GCC (4.2?) or what?

  3. grarpamp commented at 2:50 AM on July 2, 2012: none

    Value analysis in your compiler is obviously deficient. Is that an old version of GCC (4.2?) or what?

    Instead of upgrading, FreeBSD seems to like to patch contributed source like gcc, ssh, ssl, bind, etc that is included in the base. So I've no idea what this one really contains. You'd have to see the source. To the extent it is emitted by one of the current OS's on the planet and therefore seen by others, I reported it for consideration.

    gcc version 4.2.1 20070831 patched [FreeBSD] RELENG_8 i386

  4. laanwj commented at 8:04 AM on September 21, 2012: member

    Investigation by gmaxwell shows these warnings are false positives -> closing this

  5. laanwj closed this on Sep 21, 2012

  6. suprnurd referenced this in commit 9694658cd3 on Dec 5, 2017
  7. DrahtBot locked this on Sep 8, 2021
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 09:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me