Explicit typecast to remove compiler warning.
Fixed integer comparison warning. #7023
pull CodeShark wants to merge 1 commits into bitcoin:master from CodeShark:signed_int_comparison_fix changing 1 files +1 −1-
CodeShark commented at 1:13 AM on November 16, 2015: contributor
-
Fixed integer comparison warning. 4d29032a64
-
in src/main.cpp:None in 4d29032a64
2576 | @@ -2577,7 +2577,7 @@ bool FindBlockPos(CValidationState &state, CDiskBlockPos &pos, unsigned int nAdd 2577 | pos.nPos = vinfoBlockFile[nFile].nSize; 2578 | } 2579 | 2580 | - if (nFile != nLastBlockFile) {
dcousens commented at 1:32 AM on November 16, 2015:This is obviously the smaller change, but, couldn't
nLastBlockFilejust beunsigned?
CodeShark commented at 1:41 AM on November 16, 2015:I think it could - but that would require having to check whether that breaks anything...and if we're going down that route, we could also start changing a bunch of other variables...and I don't think I want to go down that path right now :)
laanwj commented at 8:47 AM on November 16, 2015: memberACK. I don't think nLastBlockFile can be usefully negative, but this is clearly the least risky change.
laanwj added the label Refactoring on Nov 16, 2015paveljanik commented at 8:56 AM on November 16, 2015: contributorACK
The warning comes from #6948.
gmaxwell commented at 12:35 AM on November 17, 2015: contributorACK.
gmaxwell merged this on Nov 17, 2015gmaxwell closed this on Nov 17, 2015gmaxwell referenced this in commit 0a547d2d55 on Nov 17, 2015luke-jr referenced this in commit 9596888340 on Nov 18, 2015luke-jr referenced this in commit 37ac133328 on Dec 8, 2015MarcoFalke locked this on Sep 8, 2021ContributorsLabels
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 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
More mirrored repositories can be found on mirror.b10c.me