]> granicus.if.org Git - taglib/commitdiff
Cast the parameters of boost::endian::endian_reverse(), just in case.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 16 Feb 2016 11:35:27 +0000 (20:35 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Tue, 16 Feb 2016 11:35:27 +0000 (20:35 +0900)
taglib/toolkit/tutils.h

index 6653e47be0d6719d1a71452f3fcdd63f7222b2c3..e3e4f6c36e94b68fbf9f670cc3cf102d0e44d410 100644 (file)
@@ -65,7 +65,7 @@ namespace TagLib
       {
 #if defined(HAVE_BOOST_BYTESWAP)
 
-        return boost::endian::endian_reverse(x);
+        return boost::endian::endian_reverse(static_cast<uint16_t>(x));
 
 #elif defined(HAVE_GCC_BYTESWAP)
 
@@ -101,7 +101,7 @@ namespace TagLib
       {
 #if defined(HAVE_BOOST_BYTESWAP)
 
-        return boost::endian::endian_reverse(x);
+        return boost::endian::endian_reverse(static_cast<uint32_t>(x));
 
 #elif defined(HAVE_GCC_BYTESWAP)
 
@@ -140,7 +140,7 @@ namespace TagLib
       {
 #if defined(HAVE_BOOST_BYTESWAP)
 
-        return boost::endian::endian_reverse(x);
+        return boost::endian::endian_reverse(static_cast<uint64_t>(x));
 
 #elif defined(HAVE_GCC_BYTESWAP)