diff options
author | David Garcia Quintas <dgq@google.com> | 2015-12-11 14:04:59 -0800 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2015-12-11 14:04:59 -0800 |
commit | 48ec8062497ecece119d0df61d0bfdca93e11502 (patch) | |
tree | ae546c2780a72c721b4ff4c5a3d0aceaedd4ab37 /src | |
parent | 5e0da5845e8409b3229a095e3bb2649ed8072bee (diff) |
Done!
Diffstat (limited to 'src')
-rw-r--r-- | src/core/compression/algorithm.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core/compression/algorithm.c b/src/core/compression/algorithm.c index 9624c52310..8e4e5c91d4 100644 --- a/src/core/compression/algorithm.c +++ b/src/core/compression/algorithm.c @@ -84,7 +84,7 @@ int grpc_compression_algorithm_name(grpc_compression_algorithm algorithm, case GRPC_COMPRESS_ALGORITHMS_COUNT: return 0; } - GPR_UNREACHABLE_CODE(return 0); + return 0; } grpc_compression_algorithm grpc_compression_algorithm_from_mdstr( @@ -119,8 +119,8 @@ grpc_mdelem *grpc_compression_encoding_mdelem( return GRPC_MDELEM_GRPC_ENCODING_DEFLATE; case GRPC_COMPRESS_GZIP: return GRPC_MDELEM_GRPC_ENCODING_GZIP; - case GRPC_COMPRESS_ALGORITHMS_COUNT: - return NULL; + default: + break; } return NULL; } @@ -144,20 +144,6 @@ grpc_compression_algorithm grpc_compression_algorithm_for_level( GPR_UNREACHABLE_CODE(return GRPC_COMPRESS_NONE); } -grpc_compression_level grpc_compression_level_for_algorithm( - grpc_compression_algorithm algorithm) { - grpc_compression_level clevel; - GRPC_API_TRACE("grpc_compression_level_for_algorithm(algorithm=%d)", 1, - ((int)algorithm)); - for (clevel = GRPC_COMPRESS_LEVEL_NONE; clevel < GRPC_COMPRESS_LEVEL_COUNT; - ++clevel) { - if (grpc_compression_algorithm_for_level(clevel) == algorithm) { - return clevel; - } - } - GPR_UNREACHABLE_CODE(return GRPC_COMPRESS_LEVEL_NONE); -} - void grpc_compression_options_init(grpc_compression_options *opts) { opts->enabled_algorithms_bitset = (1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1; opts->default_compression_algorithm = GRPC_COMPRESS_NONE; |