This should prevent warnings like the following:
=== BUILD TARGET FirebaseFirestore OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/stream.mm:17:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/stream.h:27:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/grpc_connection.h:28:
In file included from $PROJECT_DIR/platforms/ios/Pods/FirebaseFirestore/Firestore/core/src/firebase/firestore/remote/grpc_stream.h:35:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/generic/generic_stub.h:24:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/support/async_stream.h:22:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/async_stream.h:26:
In file included from $PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/service_type.h:24:
$PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/rpc_service_method.h:49:16: warning: parameter 'rpc_requester' not found in the function declaration
[-Wdocumentation]
/// \param rpc_requester : used only by the callback API. It is a function
^~~~~~~~~~~~~
$PROJECT_DIR/platforms/ios/build/emulator/grpcpp.framework/Headers/impl/codegen/rpc_service_method.h:49:16: note: did you mean 'requester'?
/// \param rpc_requester : used only by the callback API. It is a function
^~~~~~~~~~~~~
requester
1 warning generated.
Ref-counted and inlined slices both have a lenght value, but
they are not in the same byte offset. As a result, we will
have two different loads based on a branch.
Instead move them to the same byteoffset, so that we will have
one move and the same number of branches.
Difference can be seen on:
https://godbolt.org/z/kqFZcP
Initializing GrpcCodegen as a global static variable
is problematic because it is possible for it to get
destructed before the last instance of `GrpcLibraryCodegen`
gets destructed and leaves the program dealing with
a dangling pointer (imagine a scenario where another
thread is using gRPC resources and the main thread
tries to join it in an object's destructor after
main ends and CoreCodegen is destructed.)
In fact, Google style guide explicitly forbids
non-trivially-destructible global variables of static
storage duration for this and other reasons and the
solution in this commit is among the recommended
workarounds referenced in
https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables