From a33881a6386f1bd4aed3b206f593632deebc292f Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Wed, 4 Aug 2021 17:42:42 +0200 Subject: [PATCH] Fix Wgnu-folding-constant. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL fixes "variable length array folded to constant array as an extension" by switching the constant variable declaration to an enum, which is compile-time constant. Bug: None Change-Id: Iff8cd22e6320a19439fc3f1ae2fb7126210e080b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227642 Reviewed-by: Kári Helgason Commit-Queue: Kári Helgason Cr-Commit-Position: refs/heads/master@{#34651} --- .../objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m index ad7b99a4b2..ab0d1b89bc 100644 --- a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m +++ b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m @@ -1478,7 +1478,7 @@ static const size_t SRFrameHeaderOverhead = 32; case NSStreamEventHasBytesAvailable: { SRFastLog(@"NSStreamEventHasBytesAvailable %@", aStream); - const int bufferSize = 2048; + enum EnumType : int { bufferSize = 2048 }; uint8_t buffer[bufferSize]; while (self->_inputStream.hasBytesAvailable) {