Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTDB FSRWebSocket: suppress diagnostic error #7460

Merged
merged 4 commits into from
Feb 4, 2021
Merged

Conversation

maksymmalyhin
Copy link
Contributor

@maksymmalyhin maksymmalyhin commented Feb 4, 2021

Fix for cl/355486726 - g3 build error:

error: variable length array used [-Werror,-Wvla]
            uint8_t buffer[bufferSize];
                           ^~~~~~~~~~

@@ -1559,8 +1559,12 @@ - (void)safeHandleEvent:(NSStreamEvent)eventCode stream:(NSStream *)aStream

case NSStreamEventHasBytesAvailable: {
SRFastLog(@"NSStreamEventHasBytesAvailable %@", aStream);

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvla"
const NSUInteger bufferSize = 2048;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks related to building for Objective-C++ instead of Objective C. Do you understand why that's happening?

Either way, it might be cleaner to address with a #define BUFFER_SIZE instead since all usages are in this file.

@google-oss-bot
Copy link

google-oss-bot commented Feb 4, 2021

Coverage Report

Affected SDKs

  • FirebaseDatabase-ios-FirebaseDatabase.framework

    SDK overall coverage changed from 57.22% (7122d8b) to 57.22% (410e539) by +0.00%.

    Filename Base (7122d8b) Head (410e539) Diff
    FSRWebSocket.m 41.60% 41.67% +0.07%

Test Logs

@maksymmalyhin maksymmalyhin merged commit feb5ce9 into master Feb 4, 2021
@maksymmalyhin maksymmalyhin deleted the mm/rtdb-g3-fix branch February 4, 2021 22:35
@firebase firebase locked and limited conversation to collaborators Mar 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants