Mercurial > hg > bitcoin
changeset 2912:99463a72dea3 draft
fix warnings: array subscript is of type 'char' [-Wchar-subscripts]
author | Wladimir J. van der Laan <laanwj@gmail.com> |
---|---|
date | Sun, 15 Apr 2012 12:22:30 +0200 |
parents | c32254a9b67e |
children | 20089602fcd9 |
files | src/bignum.h src/uint256.h |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/bignum.h +++ b/src/bignum.h @@ -300,7 +300,7 @@ while (isxdigit(*psz)) { *this <<= 4; - int n = phexdigit[*psz++]; + int n = phexdigit[(unsigned char)*psz++]; *this += n; } if (fNegative)
--- a/src/uint256.h +++ b/src/uint256.h @@ -315,7 +315,7 @@ // hex string to uint static char phexdigit[256] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0xa,0xb,0xc,0xd,0xe,0xf,0,0,0,0,0,0,0,0,0 }; const char* pbegin = psz; - while (phexdigit[*psz] || *psz == '0') + while (phexdigit[(unsigned char)*psz] || *psz == '0') psz++; psz--; unsigned char* p1 = (unsigned char*)pn;