forked from osmocom/wireshark
Squelch some compiler warnings.
svn path=/trunk/; revision=37685
This commit is contained in:
parent
0b2cb8a575
commit
4447b23f6b
|
@ -1226,7 +1226,7 @@ proto_tree_new_item(field_info *new_fi, proto_tree *tree,
|
|||
guint32 value, n;
|
||||
float floatval;
|
||||
double doubleval;
|
||||
char *string;
|
||||
const char *string;
|
||||
nstime_t time_stamp;
|
||||
GPtrArray *ptrs;
|
||||
|
||||
|
@ -1458,12 +1458,15 @@ proto_tree_new_item(field_info *new_fi, proto_tree *tree,
|
|||
* we're putting this item.
|
||||
*/
|
||||
if (length == -1) {
|
||||
gchar *string_writable;
|
||||
|
||||
/* This can throw an exception */
|
||||
length = tvb_strsize(tvb, start);
|
||||
|
||||
string = ep_alloc(length);
|
||||
string_writable = ep_alloc(length);
|
||||
|
||||
tvb_memcpy(tvb, string, start, length);
|
||||
tvb_memcpy(tvb, string_writable, start, length);
|
||||
string = string_writable;
|
||||
} else if (length == 0) {
|
||||
string = "[Empty]";
|
||||
} else {
|
||||
|
|
|
@ -1021,12 +1021,13 @@ IA5_7BIT_decode(unsigned char * dest, const unsigned char* src, int len)
|
|||
gchar*
|
||||
ws_strdup_escape_char (const gchar *str, const gchar chr)
|
||||
{
|
||||
gchar *p, *q, *new_str;
|
||||
const gchar *p;
|
||||
gchar *q, *new_str;
|
||||
|
||||
if(!str)
|
||||
return NULL;
|
||||
|
||||
p = (gchar *)str;
|
||||
p = str;
|
||||
/* Worst case: A string that is full of 'chr' */
|
||||
q = new_str = g_malloc (strlen(str) * 2 + 1);
|
||||
|
||||
|
@ -1049,12 +1050,13 @@ ws_strdup_escape_char (const gchar *str, const gchar chr)
|
|||
gchar*
|
||||
ws_strdup_unescape_char (const gchar *str, const char chr)
|
||||
{
|
||||
gchar *p, *q, *new_str;
|
||||
const gchar *p;
|
||||
gchar *q, *new_str;
|
||||
|
||||
if(!str)
|
||||
return NULL;
|
||||
|
||||
p = (gchar *)str;
|
||||
p = str;
|
||||
/* Worst case: A string that contains no 'chr' */
|
||||
q = new_str = g_malloc (strlen(str) + 1);
|
||||
|
||||
|
|
|
@ -3183,7 +3183,7 @@ static dgt_set_t Dgt1_9_bcd = {
|
|||
'0','1','2','3','4','5','6','7','8','9','?','?','?','?','?'
|
||||
}
|
||||
};
|
||||
gchar *
|
||||
const gchar *
|
||||
tvb_bcd_dig_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first)
|
||||
{
|
||||
int length;
|
||||
|
|
|
@ -627,7 +627,7 @@ typedef struct dgt_set_t
|
|||
}
|
||||
dgt_set_t;
|
||||
|
||||
extern gchar *tvb_bcd_dig_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first);
|
||||
extern const gchar *tvb_bcd_dig_to_ep_str(tvbuff_t *tvb, const gint offset, const gint len, dgt_set_t *dgt, gboolean skip_first);
|
||||
|
||||
struct tvbuff *tvb_get_ds_tvb(tvbuff_t *tvb);
|
||||
|
||||
|
|
Loading…
Reference in New Issue