Build System: Prevent warning about "maybe uninitialized variable" nStart in init.cpp #10768

pull ReneNyffenegger wants to merge 3 commits into bitcoin:master from ReneNyffenegger:init-nStart changing 1 files +2 −0
  1. ReneNyffenegger commented at 3:33 PM on July 7, 2017: contributor

    The compiler apparently is unable to detect that nStart is initialized and issues a warning because -Wmaybe-uniniatiialized is enalbed.

    The #pragma ... and #pragma ... pop prevent the warning for the line in question.

  2. Change ARFLAGS to cr to prevent warnings 'ar: u modifier ignored since D is the default ...' bb4bb93216
  3. Prevent warning: ‘nStart’ may be used uninitialized in this function 234452654c
  4. Revert changes on configure.ac d8b84eaef0
  5. fanquake commented at 3:37 PM on July 7, 2017: member

    Duplicate of #10714.

  6. TheBlueMatt commented at 6:28 PM on July 7, 2017: member

    Prefer #10714 - GCC is technically correct here, its a race to hit fShutdown before the print, no reason to silence it, we should fix our bug.

  7. jonasschnelli added the label Refactoring on Jul 7, 2017
  8. ReneNyffenegger commented at 12:07 PM on July 13, 2017: contributor

    This PR can be closed as #10714 has solved the problem this PR tried to address.

  9. jtimon commented at 8:35 PM on July 13, 2017: contributor

    It doesn't look like #10714 solved the warning? after #10714 don't we just need to initialize nStart to 0 when it's declared or something?

    Also, @ReneNyffenegger you can close your own PRs yourself if you want.

  10. ReneNyffenegger closed this on Jul 14, 2017

  11. ReneNyffenegger commented at 4:12 AM on July 14, 2017: contributor

    I didn't know I could close my pull requests. Doing it now.

  12. ReneNyffenegger deleted the branch on Jul 14, 2017
  13. DrahtBot locked this on Sep 8, 2021

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 06:15 UTC

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