Clang 5 emits -Wmissing-field-initializers warnings #855

issue hebasto opened this issue on December 4, 2020
  1. hebasto commented at 2:46 PM on December 4, 2020: member

    While compiling the Bitcoin Core master branch (https://github.com/bitcoin/bitcoin/commit/c1604483d34f745fe6dc77a5f1be4fcfad7408a7) with Clang 5 having the following warnings:

    src/secp256k1.c:79:9: warning: missing field 'pre_g_128' initializer [-Wmissing-field-initializers]
        { 0 },
            ^
    src/secp256k1.c:80:9: warning: missing field 'blind' initializer [-Wmissing-field-initializers]
        { 0 },
            ^
    2 warnings generated.
    
  2. hebasto commented at 3:01 PM on December 4, 2020: member

    No warnings with Clang 6.

  3. hebasto commented at 3:03 PM on December 4, 2020: member
  4. real-or-random commented at 3:44 PM on December 4, 2020: contributor

    Is https://reviews.llvm.org/D28148 a fix?

    Probably.

    The code is correct and I don't think it's an issue that we have a spurious warning with clang 5. Is there anything you expect us to do about this?

  5. hebasto commented at 7:42 PM on December 4, 2020: member

    The code is correct and I don't think it's an issue that we have a spurious warning with clang 5. Is there anything you expect us to do about this?

    I thought the issue could affect my work on the build system, as one of CI jobs builds with Clang 5, and -Werror is enabled by default now. But test passed.

    Closing.

  6. hebasto closed this on Dec 4, 2020

  7. real-or-random commented at 9:53 AM on December 5, 2020: contributor

    Ok, just ping us again if this turns out to be annoying in Core.

    This init list has created a bunch of warning in the past, in different variants and different compilers...


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-14 11:15 UTC

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