bitcoin-tx: fix compile warnings #4696

pull theuni wants to merge 1 commits into bitcoin:master from theuni:tx-fix-warnings changing 1 files +6 −6
  1. theuni commented at 3:58 PM on August 13, 2014: member

    Cleans up a bunch of: warning: missing braces around initializer for ‘const<anonymous struct>’

  2. bitcoin-tx: fix build warnings
    Cleans up a bunch of:
    warning: missing braces around initializer for ‘const<anonymous struct>’
    616c24307f
  3. jgarzik commented at 7:33 PM on August 13, 2014: contributor

    Perhaps better to follow rpcrawtransaction.cpp in this regard? https://github.com/bitcoin/bitcoin/blob/master/src/rpcrawtransaction.cpp#L650

    What compiler are you building with? I don't see any warnings.

  4. laanwj added the label Build system on Aug 14, 2014
  5. laanwj commented at 8:53 AM on August 14, 2014: member

    ACK. Clearly the brace grouping per record was missing. Looks like a correct change to me.

  6. sipa commented at 9:38 AM on August 14, 2014: member

    Untested ACK

  7. laanwj merged this on Aug 14, 2014
  8. laanwj closed this on Aug 14, 2014

  9. laanwj referenced this in commit 99170259d2 on Aug 14, 2014
  10. jgarzik commented at 12:14 PM on August 14, 2014: contributor

    It would have been nice to have a response to my feedback, before merging. That is the purpose of leaving feedback. I don't ask these questions just to hear myself talk.

    The code in question came from rpcrawtransaction.cpp originally.

    The change as merged diverges further from rpcrawtransaction, rather than converging.

  11. laanwj commented at 12:42 PM on August 14, 2014: member

    @jgarzik You can still use a different way to solve this, if you think it matters. To keep the number of open pulls from getting out of hand, merging trivial and obviously correct changes quickly makes sense.

  12. laanwj commented at 12:51 PM on August 14, 2014: member

    You do make a good point that the code is duplicated, though. It would be better to have this mapping only in one place.

  13. jgarzik commented at 1:10 PM on August 14, 2014: contributor

    Yes, the two pieces of code perform exactly the same function, and keeping the parsing interfaces unified is better long term.

  14. theuni commented at 3:16 PM on August 14, 2014: member

    @jgarzik sorry for not responding before merge. Warning comes from most compilers I tried, specifically g++ 4.7 I'm using now and shows it. I didn't look into how it was being used, just fixed the aggregate initialization as the compiler pointed out.

    I can move findSighashFlags to a utility class somewhere, I agree that it's strange to find that implemented twice. Where would make the most sense?

  15. 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-18 15:15 UTC

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