diff options
author | dwight <dwight@10gen.com> | 2010-11-25 11:32:32 -0500 |
---|---|---|
committer | dwight <dwight@10gen.com> | 2010-11-25 11:32:32 -0500 |
commit | c0bc0ccf7c3edfad1b29580c2d08af69c8283b70 (patch) | |
tree | c040d182e2c53ec3f72e5c70d87595122bf6fb3b /bson | |
parent | df3077d5aa985e4f5e32b49cfa11b81968da0f2a (diff) | |
download | mongo-c0bc0ccf7c3edfad1b29580c2d08af69c8283b70.tar.gz |
fix warning
Diffstat (limited to 'bson')
-rw-r--r-- | bson/bson-inl.h | 4 | ||||
-rw-r--r-- | bson/util/builder.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/bson/bson-inl.h b/bson/bson-inl.h index 50295feaf5e..376591502e2 100644 --- a/bson/bson-inl.h +++ b/bson/bson-inl.h @@ -285,11 +285,11 @@ namespace mongo { case Symbol: case mongo::String: { unsigned x = (unsigned) valuestrsize(); - if ( x < BSONObjMaxInternalSize && valuestr()[x-1] == 0 ) + if ( x < (unsigned) BSONObjMaxInternalSize && valuestr()[x-1] == 0 ) return; StringBuilder buf; buf << "Invalid dbref/code/string/symbol size: " << x; - if( x < BSONObjMaxInternalSize ) + if( x < (unsigned) BSONObjMaxInternalSize ) buf << " strnlen:" << mongo::strnlen( valuestr() , x ); msgasserted( 10321 , buf.str() ); break; diff --git a/bson/util/builder.h b/bson/util/builder.h index 311f66b1f1f..c09598f4f48 100644 --- a/bson/util/builder.h +++ b/bson/util/builder.h @@ -169,6 +169,7 @@ namespace mongo { }; #if defined(_WIN32) +#pragma warning( push ) #pragma warning( disable : 4996 ) #endif @@ -257,4 +258,8 @@ namespace mongo { StringBuilder& operator=( const StringBuilder& ); }; +#if defined(_WIN32) +#pragma warning( pop ) +#endif + } // namespace mongo |