]> git.tdb.fi Git - libs/datafile.git/commitdiff
Fix gcc 4.3 style warnings
authorMikko Rasa <tdb@tdb.fi>
Sun, 8 Jun 2008 15:58:44 +0000 (15:58 +0000)
committerMikko Rasa <tdb@tdb.fi>
Sun, 8 Jun 2008 15:58:44 +0000 (15:58 +0000)
source/binaryparser.cpp
source/binarywriter.cpp

index ba6414bc77a369a7eb2d7c51e06e412aee16fb0a..b55c7af3e1a8c76bc8f6c2c0855a4cea6fea7e17 100644 (file)
@@ -110,7 +110,7 @@ long long BinaryParser::parse_int()
        {
                int c=in.get();
 
-               result=result<<7 | c&0x7F;
+               result=(result<<7) | (c&0x7F);
                bits+=7;
 
                if(!(c&0x80))
index 4fc35c00449e380b7562fe33ef66dd4cca4e20a5..dd63d3dcefa03e32efd83af1f30b096e9ba54718 100644 (file)
@@ -102,12 +102,12 @@ void BinaryWriter::write_int(long long n)
        unsigned i=sizeof(long long)-1;
 
        if(n>=0)
-               for(; (i>0 && (n>>(i*7-1))==0); --i);
+               for(; (i>0 && (n>>(i*7-1))==0); --i) ;
        else
-               for(; (i>0 && (n>>(i*7-1))==-1); --i);
+               for(; (i>0 && (n>>(i*7-1))==-1); --i) ;
 
        for(++i; i--;)
-               out.put(n>>(i*7) & 0x7F | (i?0x80:0));
+               out.put((n>>(i*7) & 0x7F) | (i?0x80:0));
 }
 
 void BinaryWriter::write_string(const string &s)