summaryrefslogtreecommitdiff
path: root/asn1/inap
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2012-03-26 19:41:23 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2012-03-26 19:41:23 +0000
commit49c7005ab5d8ae17efd3cf1e5c8364944ddddea4 (patch)
tree9a1cb13788ba8981732d9c7ce34a02f09b27900a /asn1/inap
parentbeee8db906487ae7f5dd5f247058ee287fff8d9b (diff)
downloadwireshark-49c7005ab5d8ae17efd3cf1e5c8364944ddddea4.tar.gz
In dissect_invokeData(), fixup the default case of the switch statement. Fixes 2 instances of Coverity CID 813: UNREACHABLE.
svn path=/trunk/; revision=41775
Diffstat (limited to 'asn1/inap')
-rw-r--r--asn1/inap/inap.cnf18
1 files changed, 10 insertions, 8 deletions
diff --git a/asn1/inap/inap.cnf b/asn1/inap/inap.cnf
index 784ad90659..8a3e0fd256 100644
--- a/asn1/inap/inap.cnf
+++ b/asn1/inap/inap.cnf
@@ -65,7 +65,7 @@ const value_string inap_opr_code_strings[] = {
/* INAP ERRORS */
static const value_string inap_err_code_string_vals[] = {
#.TABLE_BODY ERROR.&errorCode
- { %(&errorCode)-40s, "%(_ident)s" },
+ { %(&errorCode)-40s, "%(_ident)s" },
#.TABLE_FTR
{ 0, NULL }
};
@@ -84,10 +84,12 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_
offset= %(_argument_pdu)s(tvb, actx->pinfo , tree);
break;
#.TABLE2_FTR
- cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
- proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
- expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
- /* todo call the asn.1 dissector */
+ default:
+ cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
+ proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
+ expert_add_info_format(actx->pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
+ /* todo call the asn.1 dissector */
+ break;
}
return offset;
}
@@ -162,13 +164,13 @@ static const inap_err_t inap_err_tab[] = {
#.FN_BODY Code/local VAL_PTR = &opcode
%(DEFAULT_BODY)s
if (inap_opcode_type == INAP_OPCODE_RETURN_ERROR){
- errorCode = opcode;
- col_append_str(actx->pinfo->cinfo, COL_INFO,
+ errorCode = opcode;
+ col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(errorCode, inap_err_code_string_vals, "Unknown INAP error (%%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);
}else{
- col_append_str(actx->pinfo->cinfo, COL_INFO,
+ col_append_str(actx->pinfo->cinfo, COL_INFO,
val_to_str(opcode, inap_opr_code_strings, "Unknown INAP (%%u)"));
col_append_str(actx->pinfo->cinfo, COL_INFO, " ");
col_set_fence(actx->pinfo->cinfo, COL_INFO);