summaryrefslogtreecommitdiffabout
path: root/src/eyetil.cc
Unidiff
Diffstat (limited to 'src/eyetil.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--src/eyetil.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/eyetil.cc b/src/eyetil.cc
index 2e6ab7e..11e2fb7 100644
--- a/src/eyetil.cc
+++ b/src/eyetil.cc
@@ -20,3 +20,3 @@ binary_t& binary_t::from_hex(const std::string& h) {
20 throw std::runtime_error("odd number of characters in hexadecimal number"); 20 throw std::runtime_error("odd number of characters in hexadecimal number");
21 int rvs = hs>>1; 21 size_t rvs = hs>>1;
22 resize(rvs); 22 resize(rvs);
@@ -25,5 +25,5 @@ binary_t& binary_t::from_hex(const std::string& h) {
25 char t[3] = { 0,0,0 }; 25 char t[3] = { 0,0,0 };
26 for(int i=0;i<rvs;++i) { 26 for(size_t i=0;i<rvs;++i) {
27 t[0]=*(hp++); t[1]=*(hp++); 27 t[0]=*(hp++); t[1]=*(hp++);
28 *(oi++) = strtol(t,0,16); 28 *(oi++) = static_cast<binary_t::value_type>(0xff&strtol(t,0,16));
29 } 29 }
@@ -56,3 +56,3 @@ std::string binary_t::hex() const {
56 for(const_iterator i=begin(),ie=end();i!=ie;++i) { 56 for(const_iterator i=begin(),ie=end();i!=ie;++i) {
57 int rc = snprintf(t,sizeof(t),"%02x",*i); 57 size_t rc = snprintf(t,sizeof(t),"%02x",*i);
58 assert(rc<sizeof(t)); 58 assert(rc<sizeof(t));
@@ -160,3 +160,3 @@ struct block512_t {
160 while(uint32_t hw = sum>>16) sum = (sum&0xffff)+hw; 160 while(uint32_t hw = sum>>16) sum = (sum&0xffff)+hw;
161 return ~sum; 161 return 0xffff&~sum;
162 } 162 }