aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-23 04:35:23 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2010-02-23 04:35:23 +0000
commit8a76942ba20ed01373035a20a7b4c27757fe4888 (patch)
tree3da9f7edf233ea0fd8da8fe6176170656152bb1a /epan
parent40fae42f5a521e26a67031a8ac451c6354751913 (diff)
Squelch a bunch of compiler warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31961 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan')
-rw-r--r--epan/crypt/airpdcap.c20
-rw-r--r--epan/dissectors/packet-ansi_map.c8
-rw-r--r--epan/dissectors/packet-gsm_map.c8
-rw-r--r--epan/dissectors/packet-gsm_map.h2
-rw-r--r--epan/dissectors/packet-gtp.c4
-rw-r--r--epan/dissectors/packet-ldap.c46
-rw-r--r--epan/dissectors/packet-ranap.c2
-rw-r--r--epan/dissectors/packet-rrc.h2
-rw-r--r--epan/packet.c4
-rw-r--r--epan/packet.h2
10 files changed, 49 insertions, 49 deletions
diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c
index b3056cda13..ed0934ddd9 100644
--- a/epan/crypt/airpdcap.c
+++ b/epan/crypt/airpdcap.c
@@ -334,7 +334,7 @@ decrypted version. Then Wireshark wouldn't have to decrypt packets on the fly i
static void
-AirPDcapDecryptWPABroadcastKey(P_EAPOL_RSN_KEY pEAPKey, guint8 *decryption_key, PAIRPDCAP_SEC_ASSOCIATION sa)
+AirPDcapDecryptWPABroadcastKey(const EAPOL_RSN_KEY *pEAPKey, guint8 *decryption_key, PAIRPDCAP_SEC_ASSOCIATION sa)
{
guint8 new_key[32];
guint8 key_version;
@@ -359,7 +359,7 @@ AirPDcapDecryptWPABroadcastKey(P_EAPOL_RSN_KEY pEAPKey, guint8 *decryption_key,
}
/* Encrypted key is in the information element field of the EAPOL key packet */
- szEncryptedKey = g_memdup(pEAPKey->ie, key_len);
+ szEncryptedKey = (guint8 *)g_memdup(pEAPKey->ie, key_len);
DEBUG_DUMP("Encrypted Broadcast key:", szEncryptedKey, key_len);
DEBUG_DUMP("KeyIV:", pEAPKey->key_iv, 16);
@@ -440,7 +440,7 @@ AirPDcapDecryptWPABroadcastKey(P_EAPOL_RSN_KEY pEAPKey, guint8 *decryption_key,
/* Return a pointer the the requested SA. If it doesn't exist create it. */
-PAIRPDCAP_SEC_ASSOCIATION
+static PAIRPDCAP_SEC_ASSOCIATION
AirPDcapGetSaPtr(
PAIRPDCAP_CONTEXT ctx,
AIRPDCAP_SEC_ASSOCIATION_ID *id)
@@ -459,7 +459,7 @@ AirPDcapGetSaPtr(
}
#define GROUP_KEY_PAYLOAD_LEN (8+4+sizeof(EAPOL_RSN_KEY))
-INT AirPDcapScanForGroupKey(
+static INT AirPDcapScanForGroupKey(
PAIRPDCAP_CONTEXT ctx,
const guint8 *data,
const guint mac_header_len,
@@ -480,7 +480,7 @@ INT AirPDcapScanForGroupKey(
0x88, 0x8E /* Type: 802.1X authentication */
};
- P_EAPOL_RSN_KEY pEAPKey;
+ const EAPOL_RSN_KEY *pEAPKey;
#ifdef _DEBUG
CHAR msgbuf[255];
#endif
@@ -1006,7 +1006,7 @@ AirPDcapRsnaMng(
}
/* allocate a temp buffer for the decryption loop */
- try_data=ep_alloc(*decrypt_len);
+ try_data=(UCHAR *)ep_alloc(*decrypt_len);
/* start of loop added by GCS */
for(/* sa */; sa != NULL ;sa=sa->next) {
@@ -1089,7 +1089,7 @@ AirPDcapWepMng(
INT key_index;
AIRPDCAP_KEY_ITEM *tmp_key;
UINT8 useCache=FALSE;
- UCHAR *try_data = ep_alloc(*decrypt_len);
+ UCHAR *try_data = (UCHAR *)ep_alloc(*decrypt_len);
if (sa->key!=NULL)
useCache=TRUE;
@@ -1200,7 +1200,7 @@ AirPDcapRsna4WHandshake(
/* This saves the sa since we are reauthenticating which will overwrite our current sa GCS*/
if(sa->handshake == 4) {
- tmp_sa=se_alloc(sizeof(AIRPDCAP_SEC_ASSOCIATION));
+ tmp_sa=(AIRPDCAP_SEC_ASSOCIATION *)se_alloc(sizeof(AIRPDCAP_SEC_ASSOCIATION));
memcpy(tmp_sa, sa, sizeof(AIRPDCAP_SEC_ASSOCIATION));
sa->next=tmp_sa;
}
@@ -1395,7 +1395,7 @@ AirPDcapRsna4WHandshake(
if (AIRPDCAP_EAP_ACK(data[offset+1])==1 &&
AIRPDCAP_EAP_MIC(data[offset])==1)
{
- P_EAPOL_RSN_KEY pEAPKey;
+ const EAPOL_RSN_KEY *pEAPKey;
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapRsna4WHandshake", "4-way handshake message 3", AIRPDCAP_DEBUG_LEVEL_3);
/* On reception of Message 3, the Supplicant silently discards the message if the Key Replay Counter field */
@@ -1795,7 +1795,7 @@ parse_key_string(gchar* input_string)
if (res && key_ba->len > 0) {
/* Key is correct! It was probably an 'old style' WEP key */
/* Create the decryption_key_t structure, fill it and return it*/
- dk = g_malloc(sizeof(decryption_key_t));
+ dk = (decryption_key_t *)g_malloc(sizeof(decryption_key_t));
dk->type = AIRPDCAP_KEY_TYPE_WEP;
/* XXX - The current key handling code in the GUI requires
diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c
index 1202d9aa71..1607e4d4db 100644
--- a/epan/dissectors/packet-ansi_map.c
+++ b/epan/dissectors/packet-ansi_map.c
@@ -1178,7 +1178,7 @@ TransactionId_table_cleanup(gpointer key , gpointer value, gpointer user_data _U
}
-void
+static void
ansi_map_init_transaction_table(void){
/* Destroy any existing memory chunks / hashes. */
@@ -1373,7 +1373,7 @@ static dgt_set_t Dgt1_9_bcd = {
};
/* Assumes the rest of the tvb contains the digits to be turned into a string
*/
-static char*
+static const char*
unpack_digits2(tvbuff_t *tvb, int offset,dgt_set_t *dgt){
int length;
@@ -1474,7 +1474,7 @@ static const value_string ansi_map_np_vals[] = {
static void
dissect_ansi_map_min_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree _U_, asn1_ctx_t *actx _U_){
- char *digit_str;
+ const char *digit_str;
int offset = 0;
proto_tree *subtree;
@@ -1493,7 +1493,7 @@ dissect_ansi_map_digits_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
guint8 octet , octet_len;
guint8 b1,b2,b3,b4;
int offset = 0;
- char *digit_str;
+ const char *digit_str;
proto_tree *subtree;
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 3a40f21d84..1d761d1e92 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -2195,7 +2195,7 @@ static const value_string gsm_map_disc_par_vals[] = {
{ 0, NULL }
};
-char *
+const char *
unpack_digits(tvbuff_t *tvb, int offset) {
int length;
@@ -2206,7 +2206,7 @@ unpack_digits(tvbuff_t *tvb, int offset) {
length = tvb_length(tvb);
if (length < offset)
return "";
- digit_str = ep_alloc((length - offset)*2+1);
+ digit_str = (char *)ep_alloc((length - offset)*2+1);
while ( offset < length ){
@@ -2680,7 +2680,7 @@ dissect_cbs_data_coding_scheme(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
void
dissect_gsm_map_msisdn(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
{
- char *digit_str;
+ const char *digit_str;
guint8 octet;
guint8 na;
guint8 np;
@@ -2898,7 +2898,7 @@ static int
dissect_gsm_map_TBCD_STRING(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 197 "gsm_map.cnf"
tvbuff_t *parameter_tvb;
- char *digit_str;
+ const char *digit_str;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
&parameter_tvb);
diff --git a/epan/dissectors/packet-gsm_map.h b/epan/dissectors/packet-gsm_map.h
index 835468f9f6..f002c68e27 100644
--- a/epan/dissectors/packet-gsm_map.h
+++ b/epan/dissectors/packet-gsm_map.h
@@ -52,7 +52,7 @@ typedef struct _gsm_map_tap_rec_t {
#define SMS_ENCODING_UCS2_LANG 5
WS_VAR_IMPORT const value_string gsm_map_opr_code_strings[];
-char* unpack_digits(tvbuff_t *tvb, int offset);
+const char* unpack_digits(tvbuff_t *tvb, int offset);
extern const value_string ssCode_vals[];
extern const value_string gsm_map_PDP_Type_Organisation_vals[];
diff --git a/epan/dissectors/packet-gtp.c b/epan/dissectors/packet-gtp.c
index e72bd3981f..1a1505a630 100644
--- a/epan/dissectors/packet-gtp.c
+++ b/epan/dissectors/packet-gtp.c
@@ -5174,7 +5174,7 @@ static int decode_gtp_imeisv(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
proto_tree *ext_imeisv;
proto_item *te;
tvbuff_t *next_tvb;
- char *digit_str;
+ const char *digit_str;
length = tvb_get_ntohs(tvb, offset + 1);
te = proto_tree_add_text(tree, tvb, offset, 3 + length, "%s", val_to_str(GTP_EXT_IMEISV, gtp_val, "Unknown"));
@@ -5193,7 +5193,7 @@ static int decode_gtp_imeisv(tvbuff_t * tvb, int offset, packet_info * pinfo _U_
next_tvb = tvb_new_subset(tvb, offset, length, length);
digit_str = unpack_digits(next_tvb, 0);
proto_tree_add_string(ext_imeisv, hf_gtp_ext_imeisv, next_tvb, 0, -1, digit_str);
- proto_item_append_text(te, ": %s", digit_str);
+ proto_item_append_text(te, ": %s", digit_str);
return 3 + length;
}
diff --git a/epan/dissectors/packet-ldap.c b/epan/dissectors/packet-ldap.c
index d048144537..5e156f15bc 100644
--- a/epan/dissectors/packet-ldap.c
+++ b/epan/dissectors/packet-ldap.c
@@ -635,7 +635,7 @@ static int dissect_mscldap_ntver_flags(proto_tree *parent_tree, tvbuff_t *tvb, i
}
/* This string contains the last LDAPString that was decoded */
-static char *attributedesc_string=NULL;
+static const char *attributedesc_string=NULL;
/* This string contains the last AssertionValue that was decoded */
static char *ldapvalue_string=NULL;
@@ -759,14 +759,14 @@ finished:
}
/* This string contains the last Filter item that was decoded */
-static char *Filter_string=NULL;
+static const char *Filter_string=NULL;
static char *and_filter_string=NULL;
static char *or_filter_string=NULL;
static char *substring_value=NULL;
-static char *substring_item_init=NULL;
-static char *substring_item_any=NULL;
-static char *substring_item_final=NULL;
-static char *matching_rule_string=NULL;
+static const char *substring_item_init=NULL;
+static const char *substring_item_any=NULL;
+static const char *substring_item_final=NULL;
+static const char *matching_rule_string=NULL;
static gboolean matching_rule_dnattr=FALSE;
/* Global variables */
@@ -971,7 +971,7 @@ static int
dissect_ldap_LDAPString(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 324 "ldap.cnf"
tvbuff_t *parameter_tvb = NULL;
- char *ldapstring = NULL;
+ const char *ldapstring = NULL;
gchar *sc = NULL; /* semi-colon pointer */
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index,
@@ -4113,22 +4113,22 @@ static int dissect_mscldap_netlogon_flags(proto_tree *parent_tree, tvbuff_t *tvb
proto_item *item;
proto_tree *tree=NULL;
guint fields[] = {
- hf_mscldap_netlogon_flags_fnc,
- hf_mscldap_netlogon_flags_dnc,
- hf_mscldap_netlogon_flags_dns,
- hf_mscldap_netlogon_flags_wdc,
- hf_mscldap_netlogon_flags_rodc,
- hf_mscldap_netlogon_flags_ndnc,
- hf_mscldap_netlogon_flags_good_timeserv,
- hf_mscldap_netlogon_flags_writable,
- hf_mscldap_netlogon_flags_closest,
- hf_mscldap_netlogon_flags_timeserv,
- hf_mscldap_netlogon_flags_kdc,
- hf_mscldap_netlogon_flags_ds,
- hf_mscldap_netlogon_flags_ldap,
- hf_mscldap_netlogon_flags_gc,
- hf_mscldap_netlogon_flags_pdc,
- 0 };
+ hf_mscldap_netlogon_flags_fnc,
+ hf_mscldap_netlogon_flags_dnc,
+ hf_mscldap_netlogon_flags_dns,
+ hf_mscldap_netlogon_flags_wdc,
+ hf_mscldap_netlogon_flags_rodc,
+ hf_mscldap_netlogon_flags_ndnc,
+ hf_mscldap_netlogon_flags_good_timeserv,
+ hf_mscldap_netlogon_flags_writable,
+ hf_mscldap_netlogon_flags_closest,
+ hf_mscldap_netlogon_flags_timeserv,
+ hf_mscldap_netlogon_flags_kdc,
+ hf_mscldap_netlogon_flags_ds,
+ hf_mscldap_netlogon_flags_ldap,
+ hf_mscldap_netlogon_flags_gc,
+ hf_mscldap_netlogon_flags_pdc,
+ 0 };
guint *field;
header_field_info *hfi;
gboolean one_bit_set = FALSE;
diff --git a/epan/dissectors/packet-ranap.c b/epan/dissectors/packet-ranap.c
index 2146507015..277d6566c7 100644
--- a/epan/dissectors/packet-ranap.c
+++ b/epan/dissectors/packet-ranap.c
@@ -4308,7 +4308,7 @@ static int
dissect_ranap_IMSI(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_) {
#line 179 "ranap.cnf"
tvbuff_t* imsi_tvb;
- char *digit_str;
+ const char *digit_str;
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 8, FALSE, &imsi_tvb);
diff --git a/epan/dissectors/packet-rrc.h b/epan/dissectors/packet-rrc.h
index 1f3e9f6121..172a5f0acf 100644
--- a/epan/dissectors/packet-rrc.h
+++ b/epan/dissectors/packet-rrc.h
@@ -51,7 +51,7 @@ enum rrc_message_type {
RRC_MESSAGE_TYPE_UL_CCCH,
RRC_MESSAGE_TYPE_DL_CCCH,
RRC_MESSAGE_TYPE_UL_DCCH,
- RRC_MESSAGE_TYPE_DL_DCCH,
+ RRC_MESSAGE_TYPE_DL_DCCH
};
#define MAX_RRC_FRAMES 64
diff --git a/epan/packet.c b/epan/packet.c
index 551cf9bd88..7c43e70e96 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -1056,7 +1056,7 @@ dissector_delete_string(const char *name, const gchar *pattern,
/* Change the entry for a dissector in a string dissector table
with a particular pattern to use a new dissector handle. */
void
-dissector_change_string(const char *name, gchar *pattern,
+dissector_change_string(const char *name, const gchar *pattern,
dissector_handle_t handle)
{
dissector_table_t sub_dissectors = find_dissector_table( name);
@@ -1087,7 +1087,7 @@ dissector_change_string(const char *name, gchar *pattern,
dtbl_entry->current = handle;
/* do the table insertion */
- g_hash_table_insert( sub_dissectors->hash_table, pattern,
+ g_hash_table_insert( sub_dissectors->hash_table, (gpointer)pattern,
(gpointer)dtbl_entry);
}
diff --git a/epan/packet.h b/epan/packet.h
index d68f80a976..853d114f0b 100644
--- a/epan/packet.h
+++ b/epan/packet.h
@@ -211,7 +211,7 @@ extern void dissector_delete_string(const char *name, const gchar *pattern,
/* Change the entry for a dissector in a string dissector table
with a particular pattern to use a new dissector handle. */
-extern void dissector_change_string(const char *name, gchar *pattern,
+extern void dissector_change_string(const char *name, const gchar *pattern,
dissector_handle_t handle);
/* Reset an entry in a string sub-dissector table to its initial value. */