diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h index 03c6c69..8e453a7 100644 --- a/libaudiofile/modules/SimpleModule.h +++ b/libaudiofile/modules/SimpleModule.h @@ -123,7 +123,7 @@ struct signConverter typedef typename IntTypes::UnsignedType UnsignedType; static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; - static const int kMinSignedValue = -1 << kScaleBits; + static const int kMinSignedValue = -1U << kScaleBits; struct signedToUnsigned : public std::unary_function { diff --git a/test/FloatToInt.cpp b/test/FloatToInt.cpp index 0d179a8..624be25 100644 --- a/test/FloatToInt.cpp +++ b/test/FloatToInt.cpp @@ -115,7 +115,7 @@ TEST_F(FloatToIntTest, Int16) EXPECT_EQ(readData[i], expectedData[i]); } -static const int32_t kMinInt24 = -1<<23; +static const int32_t kMinInt24 = -1U<<23; static const int32_t kMaxInt24 = (1<<23) - 1; TEST_F(FloatToIntTest, Int24) diff --git a/test/IntToFloat.cpp b/test/IntToFloat.cpp index b716635..b619a2c 100644 --- a/test/IntToFloat.cpp +++ b/test/IntToFloat.cpp @@ -117,7 +117,7 @@ TEST_F(IntToFloatTest, Int16) EXPECT_EQ(readData[i], expectedData[i]); } -static const int32_t kMinInt24 = -1<<23; +static const int32_t kMinInt24 = -1U<<23; static const int32_t kMaxInt24 = (1<<23) - 1; TEST_F(IntToFloatTest, Int24) diff --git a/test/Sign.cpp b/test/Sign.cpp index 7275399..b3609ca 100644 --- a/test/Sign.cpp +++ b/test/Sign.cpp @@ -116,7 +116,7 @@ TEST_F(SignConversionTest, Int16) EXPECT_EQ(readData[i], expectedData[i]); } -static const int32_t kMinInt24 = -1<<23; +static const int32_t kMinInt24 = -1U<<23; static const int32_t kMaxInt24 = (1<<23) - 1; static const uint32_t kMaxUInt24 = (1<<24) - 1;