From: Mikko Rasa Date: Sun, 8 Jun 2008 15:58:44 +0000 (+0000) Subject: Fix gcc 4.3 style warnings X-Git-Tag: 1.0~7 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=08576b49c8bfb6cd841724dc5124d40af9475eb8;p=libs%2Fdatafile.git Fix gcc 4.3 style warnings --- diff --git a/source/binaryparser.cpp b/source/binaryparser.cpp index ba6414b..b55c7af 100644 --- a/source/binaryparser.cpp +++ b/source/binaryparser.cpp @@ -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)) diff --git a/source/binarywriter.cpp b/source/binarywriter.cpp index 4fc35c0..dd63d3d 100644 --- a/source/binarywriter.cpp +++ b/source/binarywriter.cpp @@ -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)