1 Star 0 Fork 8

chengquan/audiofile

forked from src-openEuler/audiofile 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
audiofile-fix-gcc6-compile-error.patch 1.73 KB
一键复制 编辑 原始数据 按行查看 历史
JeanLeo 提交于 2020-01-09 17:03 +08:00 . update software package
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<Format>::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<SignedType, UnsignedType>
{
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;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/chengquanspace/audiofile.git
git@gitee.com:chengquanspace/audiofile.git
chengquanspace
audiofile
audiofile
master

搜索帮助