db-move: moved evolution from [testing] to [extra] (x86_64)
[arch-packages.git] / audiofile / trunk / 01_gcc6.patch
blobfbb237cab479d3d82998fe86559f3edd93c5d019
1 Description: Fix FTBFS with GCC 6
2 Author: Michael Schwendt <mschwendt@fedoraproject.org>
3 Origin: vendor, https://github.com/mpruett/audiofile/pull/27
4 Bug-Debian: https://bugs.debian.org/812055
5 ---
6 This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
8 --- a/libaudiofile/modules/SimpleModule.h
9 +++ b/libaudiofile/modules/SimpleModule.h
10 @@ -123,7 +123,7 @@ struct signConverter
11 typedef typename IntTypes<Format>::UnsignedType UnsignedType;
13 static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
14 - static const int kMinSignedValue = -1 << kScaleBits;
15 + static const int kMinSignedValue = 0-(1U<<kScaleBits);
17 struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
19 --- a/test/FloatToInt.cpp
20 +++ b/test/FloatToInt.cpp
21 @@ -115,7 +115,7 @@ TEST_F(FloatToIntTest, Int16)
22 EXPECT_EQ(readData[i], expectedData[i]);
25 -static const int32_t kMinInt24 = -1<<23;
26 +static const int32_t kMinInt24 = 0-(1U<<23);
27 static const int32_t kMaxInt24 = (1<<23) - 1;
29 TEST_F(FloatToIntTest, Int24)
30 --- a/test/IntToFloat.cpp
31 +++ b/test/IntToFloat.cpp
32 @@ -117,7 +117,7 @@ TEST_F(IntToFloatTest, Int16)
33 EXPECT_EQ(readData[i], expectedData[i]);
36 -static const int32_t kMinInt24 = -1<<23;
37 +static const int32_t kMinInt24 = 0-(1U<<23);
38 static const int32_t kMaxInt24 = (1<<23) - 1;
40 TEST_F(IntToFloatTest, Int24)
41 --- a/test/NeXT.cpp
42 +++ b/test/NeXT.cpp
43 @@ -37,13 +37,13 @@
45 #include "TestUtilities.h"
47 -const char kDataUnspecifiedLength[] =
48 +const signed char kDataUnspecifiedLength[] =
50 '.', 's', 'n', 'd',
51 0, 0, 0, 24, // offset of 24 bytes
52 - 0xff, 0xff, 0xff, 0xff, // unspecified length
53 + -1, -1, -1, -1, // unspecified length
54 0, 0, 0, 3, // 16-bit linear
55 - 0, 0, 172, 68, // 44100 Hz
56 + 0, 0, -84, 68, // 44100 Hz (0xAC44)
57 0, 0, 0, 1, // 1 channel
58 0, 1,
59 0, 1,
60 @@ -57,13 +57,13 @@ const char kDataUnspecifiedLength[] =
61 0, 55
64 -const char kDataTruncated[] =
65 +const signed char kDataTruncated[] =
67 '.', 's', 'n', 'd',
68 0, 0, 0, 24, // offset of 24 bytes
69 0, 0, 0, 20, // length of 20 bytes
70 0, 0, 0, 3, // 16-bit linear
71 - 0, 0, 172, 68, // 44100 Hz
72 + 0, 0, -84, 68, // 44100 Hz (0xAC44)
73 0, 0, 0, 1, // 1 channel
74 0, 1,
75 0, 1,
76 @@ -152,13 +152,13 @@ TEST(NeXT, Truncated)
77 ASSERT_EQ(::unlink(testFileName.c_str()), 0);
80 -const char kDataZeroChannels[] =
81 +const signed char kDataZeroChannels[] =
83 '.', 's', 'n', 'd',
84 0, 0, 0, 24, // offset of 24 bytes
85 0, 0, 0, 2, // 2 bytes
86 0, 0, 0, 3, // 16-bit linear
87 - 0, 0, 172, 68, // 44100 Hz
88 + 0, 0, -84, 68, // 44100 Hz (0xAC44)
89 0, 0, 0, 0, // 0 channels
90 0, 1
92 --- a/test/Sign.cpp
93 +++ b/test/Sign.cpp
94 @@ -116,7 +116,7 @@ TEST_F(SignConversionTest, Int16)
95 EXPECT_EQ(readData[i], expectedData[i]);
98 -static const int32_t kMinInt24 = -1<<23;
99 +static const int32_t kMinInt24 = 0-(1U<<23);
100 static const int32_t kMaxInt24 = (1<<23) - 1;
101 static const uint32_t kMaxUInt24 = (1<<24) - 1;