aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/surface
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/surface')
-rw-r--r--src/core/lib/surface/call.cc6
-rw-r--r--src/core/lib/surface/channel.cc20
-rw-r--r--src/core/lib/surface/completion_queue.cc15
3 files changed, 18 insertions, 23 deletions
diff --git a/src/core/lib/surface/call.cc b/src/core/lib/surface/call.cc
index 4055d656bd..6c97f5cc01 100644
--- a/src/core/lib/surface/call.cc
+++ b/src/core/lib/surface/call.cc
@@ -808,10 +808,8 @@ static void get_final_status(grpc_call *call,
static void set_status_from_error(grpc_exec_ctx *exec_ctx, grpc_call *call,
status_source source, grpc_error *error) {
if (!gpr_atm_rel_cas(&call->status[source],
- pack_received_status((received_status){
- .is_set = false, .error = GRPC_ERROR_NONE}),
- pack_received_status((received_status){
- .is_set = true, .error = error}))) {
+ pack_received_status({false, GRPC_ERROR_NONE}),
+ pack_received_status({true, error}))) {
GRPC_ERROR_UNREF(error);
}
}
diff --git a/src/core/lib/surface/channel.cc b/src/core/lib/surface/channel.cc
index 65333cf1af..59fced7bc4 100644
--- a/src/core/lib/surface/channel.cc
+++ b/src/core/lib/surface/channel.cc
@@ -145,9 +145,8 @@ grpc_channel *grpc_channel_create_with_builder(
channel->compression_options.default_level.level =
(grpc_compression_level)grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){GRPC_COMPRESS_LEVEL_NONE,
- GRPC_COMPRESS_LEVEL_NONE,
- GRPC_COMPRESS_LEVEL_COUNT - 1});
+ {GRPC_COMPRESS_LEVEL_NONE, GRPC_COMPRESS_LEVEL_NONE,
+ GRPC_COMPRESS_LEVEL_COUNT - 1});
} else if (0 == strcmp(args->args[i].key,
GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_LEVEL)) {
channel->compression_options.default_stream_compression_level.is_set =
@@ -155,17 +154,15 @@ grpc_channel *grpc_channel_create_with_builder(
channel->compression_options.default_stream_compression_level.level =
(grpc_stream_compression_level)grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){GRPC_STREAM_COMPRESS_LEVEL_NONE,
- GRPC_STREAM_COMPRESS_LEVEL_NONE,
- GRPC_STREAM_COMPRESS_LEVEL_COUNT - 1});
+ {GRPC_STREAM_COMPRESS_LEVEL_NONE, GRPC_STREAM_COMPRESS_LEVEL_NONE,
+ GRPC_STREAM_COMPRESS_LEVEL_COUNT - 1});
} else if (0 == strcmp(args->args[i].key,
GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) {
channel->compression_options.default_algorithm.is_set = true;
channel->compression_options.default_algorithm.algorithm =
(grpc_compression_algorithm)grpc_channel_arg_get_integer(
- &args->args[i],
- (grpc_integer_options){GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
- GRPC_COMPRESS_ALGORITHMS_COUNT - 1});
+ &args->args[i], {GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE,
+ GRPC_COMPRESS_ALGORITHMS_COUNT - 1});
} else if (0 == strcmp(args->args[i].key,
GRPC_STREAM_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM)) {
channel->compression_options.default_stream_compression_algorithm.is_set =
@@ -174,9 +171,8 @@ grpc_channel *grpc_channel_create_with_builder(
.algorithm =
(grpc_stream_compression_algorithm)grpc_channel_arg_get_integer(
&args->args[i],
- (grpc_integer_options){
- GRPC_STREAM_COMPRESS_NONE, GRPC_STREAM_COMPRESS_NONE,
- GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT - 1});
+ {GRPC_STREAM_COMPRESS_NONE, GRPC_STREAM_COMPRESS_NONE,
+ GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT - 1});
} else if (0 ==
strcmp(args->args[i].key,
GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET)) {
diff --git a/src/core/lib/surface/completion_queue.cc b/src/core/lib/surface/completion_queue.cc
index 91ad2cacd4..453646bd49 100644
--- a/src/core/lib/surface/completion_queue.cc
+++ b/src/core/lib/surface/completion_queue.cc
@@ -15,6 +15,8 @@
* limitations under the License.
*
*/
+#include <grpc/support/port_platform.h>
+
#include "src/core/lib/surface/completion_queue.h"
#include <inttypes.h>
@@ -1064,13 +1066,12 @@ static grpc_event cq_pluck(grpc_completion_queue *cq, void *tag,
GRPC_CQ_INTERNAL_REF(cq, "pluck");
gpr_mu_lock(cq->mu);
cq_is_finished_arg is_finished_arg = {
- .last_seen_things_queued_ever =
- gpr_atm_no_barrier_load(&cqd->things_queued_ever),
- .cq = cq,
- .deadline = deadline,
- .stolen_completion = NULL,
- .tag = tag,
- .first_loop = true};
+ gpr_atm_no_barrier_load(&cqd->things_queued_ever),
+ cq,
+ deadline,
+ NULL,
+ tag,
+ true};
grpc_exec_ctx exec_ctx =
GRPC_EXEC_CTX_INITIALIZER(0, cq_is_pluck_finished, &is_finished_arg);
for (;;) {