forked from osmocom/wireshark
Fix various instances of "unreachable code".
svn path=/trunk/; revision=35713
This commit is contained in:
parent
043e0e0bbf
commit
7f0107220d
|
@ -5511,7 +5511,7 @@ static gint dissect_parameter_sequence(proto_tree *tree,
|
|||
offset += param_length;
|
||||
|
||||
} /* for all the parameters */
|
||||
return offset;
|
||||
g_assert_not_reached();
|
||||
}
|
||||
#undef ENSURE_LENGTH
|
||||
|
||||
|
|
|
@ -119,8 +119,8 @@ find_last_pathname_separator(const char *path)
|
|||
return strchr(path, ':');
|
||||
#else
|
||||
separator = strrchr(path, '/');
|
||||
#endif
|
||||
return separator;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -511,7 +511,6 @@ gcp_term_t* gcp_cmd_add_term(gcp_msg_t* m, gcp_trx_t* tr, gcp_cmd_t* c, gcp_term
|
|||
}
|
||||
|
||||
DISSECTOR_ASSERT_NOT_REACHED();
|
||||
return NULL;
|
||||
}
|
||||
} else {
|
||||
ct = ep_new(gcp_terms_t);
|
||||
|
|
|
@ -873,7 +873,6 @@ composite_ensure_contiguous_no_exception(tvbuff_t *tvb, const guint abs_offset,
|
|||
}
|
||||
|
||||
DISSECTOR_ASSERT_NOT_REACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const guint8*
|
||||
|
@ -1035,7 +1034,6 @@ composite_memcpy(tvbuff_t *tvb, guint8* target, guint abs_offset, size_t abs_len
|
|||
}
|
||||
|
||||
DISSECTOR_ASSERT_NOT_REACHED();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void*
|
||||
|
|
|
@ -337,7 +337,6 @@ hostlist_sort_column(GtkTreeModel *model,
|
|||
#endif
|
||||
}
|
||||
g_assert_not_reached();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -970,7 +970,7 @@ packet_list_compare_records(gint sort_id, PacketListRecord *a,
|
|||
} else
|
||||
return (a->fdata->col_text[sort_id] == NULL) ? -1 : 1;
|
||||
|
||||
g_return_val_if_reached(0);
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
static gint
|
||||
|
|
|
@ -100,7 +100,7 @@ void buffer_remove_start(Buffer* buffer, gsize bytes)
|
|||
g_error("buffer_remove_start trying to remove %" G_GINT64_MODIFIER "u bytes. s=%" G_GINT64_MODIFIER "u ff=%" G_GINT64_MODIFIER "u!\n",
|
||||
(guint64)bytes, (guint64)buffer->start,
|
||||
(guint64)buffer->first_free);
|
||||
exit(1);
|
||||
/** g_error() does an abort() and thus never returns **/
|
||||
}
|
||||
buffer->start += bytes;
|
||||
|
||||
|
|
|
@ -669,7 +669,7 @@ const char *wtap_file_type_string(int filetype)
|
|||
{
|
||||
if (filetype < 0 || filetype >= wtap_num_file_types) {
|
||||
g_error("Unknown capture file type %d", filetype);
|
||||
return NULL;
|
||||
/** g_error() does an abort() and thus never returns **/
|
||||
} else
|
||||
return dump_open_table[filetype].name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue