Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1http://patchwork.ozlabs.org/patch/630200/ 2 3From 28cfdbbcb96a69087c3d21faf69b5eae7bcf6d69 Mon Sep 17 00:00:00 2001 4From: Hodorgasm <nsane457@gmail.com> 5Date: Wed, 11 May 2016 21:42:07 -0400 6Subject: [PATCH] Cast to unsigned while left bit-shifting 7 8GCC-6 now treats the left bitwise-shift of a negative integer as nonconformant so explicitly cast to an unsigned int while bit-shifting. 9 10Downloaded from upstream PR: 11https://github.com/mpruett/audiofile/pull/28 12 13Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 14--- 15 libaudiofile/modules/SimpleModule.h | 2 +- 16 1 file changed, 1 insertion(+), 1 deletion(-) 17 18diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h 19index 03c6c69..4014fb2 100644 20--- a/libaudiofile/modules/SimpleModule.h 21+++ b/libaudiofile/modules/SimpleModule.h 22@@ -123,7 +123,7 @@ struct signConverter 23 typedef typename IntTypes<Format>::UnsignedType UnsignedType; 24 25 static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; 26- static const int kMinSignedValue = -1 << kScaleBits; 27+ static const int kMinSignedValue = static_cast<signed>(static_cast<unsigned>(-1) << kScaleBits);; 28 29 struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType> 30 {