diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-21 13:17:48 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-21 13:17:48 -0600 |
commit | 292e3c830032a4634f04c3095d6bfa272b65d712 (patch) | |
tree | 37d103a34c4aebbbc76243461eb29b73152a916c /libkmime | |
parent | dc69027b0e7092ad69d8e58f1ee3aff22fd4d9c6 (diff) | |
download | tdepim-292e3c830032a4634f04c3095d6bfa272b65d712.tar.gz tdepim-292e3c830032a4634f04c3095d6bfa272b65d712.zip |
Fix a number of build warnings
Diffstat (limited to 'libkmime')
-rw-r--r-- | libkmime/boolflags.cpp | 2 | ||||
-rw-r--r-- | libkmime/kmime_charfreq.cpp | 4 | ||||
-rw-r--r-- | libkmime/kmime_codec_qp.cpp | 14 |
3 files changed, 10 insertions, 10 deletions
diff --git a/libkmime/boolflags.cpp b/libkmime/boolflags.cpp index 981e4ecc5..ad3388e5a 100644 --- a/libkmime/boolflags.cpp +++ b/libkmime/boolflags.cpp @@ -51,7 +51,7 @@ bool BoolFlags::get(unsigned int i) n=0; } else { //second byte - p=(1 << i-8); + p=(1 << (i-8)); n=1; } diff --git a/libkmime/kmime_charfreq.cpp b/libkmime/kmime_charfreq.cpp index a75d76853..93413b80c 100644 --- a/libkmime/kmime_charfreq.cpp +++ b/libkmime/kmime_charfreq.cpp @@ -84,9 +84,9 @@ void CharFreq::count( const char * it, size_t len ) { default: { uchar c = *it; - if ( c == '\t' || c >= ' ' && c <= '~' ) + if ( (c == '\t') || ((c >= ' ') && (c <= '~')) ) ++printable; - else if ( c == 127 || c < ' ' ) + else if ( (c == 127) || (c < ' ') ) ++CTL; else ++eightBit; diff --git a/libkmime/kmime_codec_qp.cpp b/libkmime/kmime_codec_qp.cpp index 7c579b6a1..149b01f2a 100644 --- a/libkmime/kmime_codec_qp.cpp +++ b/libkmime/kmime_codec_qp.cpp @@ -60,7 +60,7 @@ static inline uchar lowNibble( uchar ch ) { static inline bool keep( uchar ch ) { // no CTLs, except HT and not '?' - return !( ch < ' ' && ch != '\t' || ch == '?' ); + return !( ((ch < ' ') && (ch != '\t')) || (ch == '?') ); } // @@ -90,7 +90,7 @@ protected: mFinished(false) {} bool needsEncoding( uchar ch ) { - return ( ch > '~' || ch < ' ' && ch != '\t' || ch == '=' ); + return ( (ch > '~') || ((ch < ' ') && (ch != '\t')) || (ch == '=') ); } bool needsEncodingAtEOL( uchar ch ) { return ( ch == ' ' || ch == '\t' ); @@ -273,8 +273,8 @@ bool QuotedPrintableDecoder::decode( const char* & scursor, const char * const s // output mBadChar assert( mAccu == 0 ); if ( mBadChar ) { - if ( mBadChar >= '>' && mBadChar <= '~' || - mBadChar >= '!' && mBadChar <= '<' ) + if ( ((mBadChar >= '>') && (mBadChar <= '~')) || + ((mBadChar >= '!') && (mBadChar <= '<')) ) *dcursor++ = mBadChar; mBadChar = 0; } @@ -355,7 +355,7 @@ bool QuotedPrintableDecoder::decode( const char* & scursor, const char * const s mAccu = value << 4; } } else { // not mInsideHexChar - if ( ch <= '~' && ch >= ' ' || ch == '\t' ) { + if ( ((ch <= '~') && (ch >= ' ')) || (ch == '\t') ) { if ( ch == mEscapeChar ) { mInsideHexChar = true; } else if ( mTQEncoding && ch == '_' ) { @@ -481,8 +481,8 @@ void QuotedPrintableEncoder::createOutputBuffer( char* & dcursor, mCurrentLineLength = 0; } - if ( Never == mAccuNeedsEncoding || - AtBOL == mAccuNeedsEncoding && mCurrentLineLength != 0 ) { + if ( (Never == mAccuNeedsEncoding) || + ((AtBOL == mAccuNeedsEncoding) && (mCurrentLineLength != 0)) ) { write( mAccu, dcursor, dend ); mCurrentLineLength++; } else { |