diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-30 16:47:37 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2012-12-30 18:03:54 (GMT) |
commit | 96b31c598f5c229c3acc0579ddfe22dd503e2b9d (patch) | |
tree | d73db22e591e49f088f359b9876df232eb99c6a9 /Swiften/StringCodecs | |
parent | b19210aa48e7cea40929593daed997668fe789be (diff) | |
download | swift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.zip swift-contrib-96b31c598f5c229c3acc0579ddfe22dd503e2b9d.tar.bz2 |
Enable & fix pedantic CLang warnings.
Change-Id: I70109624b4bd7aab9ba679a3eaabc225dd64a03a
Diffstat (limited to 'Swiften/StringCodecs')
-rw-r--r-- | Swiften/StringCodecs/Base64.cpp | 1 | ||||
-rw-r--r-- | Swiften/StringCodecs/Hexify.cpp | 2 | ||||
-rw-r--r-- | Swiften/StringCodecs/MD5.cpp | 3 | ||||
-rw-r--r-- | Swiften/StringCodecs/SHA1.cpp | 4 | ||||
-rw-r--r-- | Swiften/StringCodecs/SHA256.cpp | 3 |
5 files changed, 11 insertions, 2 deletions
diff --git a/Swiften/StringCodecs/Base64.cpp b/Swiften/StringCodecs/Base64.cpp index e4eaa4e..195987e 100644 --- a/Swiften/StringCodecs/Base64.cpp +++ b/Swiften/StringCodecs/Base64.cpp @@ -14,6 +14,7 @@ namespace Swift { #pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma clang diagnostic ignored "-Wconversion" namespace { template<typename TargetType, typename SourceType> diff --git a/Swiften/StringCodecs/Hexify.cpp b/Swiften/StringCodecs/Hexify.cpp index 668079b..0e6dc4e 100644 --- a/Swiften/StringCodecs/Hexify.cpp +++ b/Swiften/StringCodecs/Hexify.cpp @@ -13,6 +13,8 @@ #include <string> #include <Swiften/Base/ByteArray.h> +#pragma clang diagnostic ignored "-Wconversion" + namespace Swift { std::string Hexify::hexify(unsigned char byte) { diff --git a/Swiften/StringCodecs/MD5.cpp b/Swiften/StringCodecs/MD5.cpp index bd03314..ffed37b 100644 --- a/Swiften/StringCodecs/MD5.cpp +++ b/Swiften/StringCodecs/MD5.cpp @@ -32,6 +32,9 @@ */ #pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma clang diagnostic ignored "-Wconversion" +#pragma clang diagnostic ignored "-Wcast-align" +#pragma clang diagnostic ignored "-Wmissing-prototypes" #include <Swiften/StringCodecs/MD5.h> diff --git a/Swiften/StringCodecs/SHA1.cpp b/Swiften/StringCodecs/SHA1.cpp index e4081f4..8b03989 100644 --- a/Swiften/StringCodecs/SHA1.cpp +++ b/Swiften/StringCodecs/SHA1.cpp @@ -185,7 +185,7 @@ SHA1::SHA1() { SHA1& SHA1::update(const std::vector<unsigned char>& input) { std::vector<unsigned char> inputCopy(input); - Update(&context, (boost::uint8_t*) vecptr(inputCopy), inputCopy.size()); + Update(&context, (boost::uint8_t*) vecptr(inputCopy), static_cast<unsigned int>(inputCopy.size())); return *this; } @@ -203,7 +203,7 @@ ByteArray SHA1::getHashInternal(const Container& input) { Init(&context); Container inputCopy(input); - Update(&context, (boost::uint8_t*) vecptr(inputCopy), inputCopy.size()); + Update(&context, (boost::uint8_t*) vecptr(inputCopy), static_cast<unsigned int>(inputCopy.size())); ByteArray digest; digest.resize(20); diff --git a/Swiften/StringCodecs/SHA256.cpp b/Swiften/StringCodecs/SHA256.cpp index f92e7af..6e3c4ec 100644 --- a/Swiften/StringCodecs/SHA256.cpp +++ b/Swiften/StringCodecs/SHA256.cpp @@ -11,6 +11,9 @@ #include <string.h> #pragma GCC diagnostic ignored "-Wold-style-cast" +#pragma clang diagnostic ignored "-Wconversion" +#pragma clang diagnostic ignored "-Wunused-macros" +#pragma clang diagnostic ignored "-Wdisabled-macro-expansion" using namespace Swift; |