aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar vpai <vpai@google.com>2014-12-15 14:40:45 -0800
committerGravatar Nicolas Noble <nnoble@google.com>2014-12-15 15:38:51 -0800
commit61cba0b29d323439fd126033bf3fb0eb9fdfe528 (patch)
treefe3710c3efd10e424d543509517d98f751e85c2a
parentca9f359b75875e1757c4352c82b824eff154882d (diff)
Add an assertion to prevent return-without-value warning.
Change on 2014/12/15 by vpai <vpai@google.com> ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=82177414
-rw-r--r--src/core/transport/chttp2/hpack_parser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/transport/chttp2/hpack_parser.c b/src/core/transport/chttp2/hpack_parser.c
index 246935fd79..07b0f81098 100644
--- a/src/core/transport/chttp2/hpack_parser.c
+++ b/src/core/transport/chttp2/hpack_parser.c
@@ -1305,6 +1305,10 @@ static int parse_value_string(grpc_chttp2_hpack_parser *p, const gpr_uint8 *cur,
case ERROR_HEADER:
return 0;
}
+ /* Add code to prevent return without value error */
+ gpr_log(GPR_ERROR, "Should never reach beyond switch in parse_value_string");
+ abort();
+ return 0;
}
static int parse_value_string_with_indexed_key(grpc_chttp2_hpack_parser *p,