commit | a33881a6386f1bd4aed3b206f593632deebc292f | [log] [tgz] |
---|---|---|
author | Mirko Bonadei <mbonadei@webrtc.org> | Wed Aug 04 15:42:42 2021 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Aug 05 07:39:25 2021 |
tree | 895fe463b293e98464e0539b8825c130f3dd5b08 | |
parent | 0d8bb9a6e8bb799e7bc0098a635f396827650ba9 [diff] |
Fix Wgnu-folding-constant. 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 <kthelgason@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#34651}
diff --git a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m index ad7b99a..ab0d1b8 100644 --- a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m +++ b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
@@ -1478,7 +1478,7 @@ case NSStreamEventHasBytesAvailable: { SRFastLog(@"NSStreamEventHasBytesAvailable %@", aStream); - const int bufferSize = 2048; + enum EnumType : int { bufferSize = 2048 }; uint8_t buffer[bufferSize]; while (self->_inputStream.hasBytesAvailable) {