aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-13 21:14:20 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-13 21:14:20 +0000
commit04766017dfe4ddb9192f832f8caffa8187073333 (patch)
treec17f06d7d265c463f041e946f7bf0af1ab800fd1 /epan/dissectors
parentc63dfc2ab40e6fc13bb696d4d2220ed59df0b30e (diff)
- [-Wmissing-prototypes]
- explicit casts. svn path=/trunk/; revision=48282
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-3g-a11.c2
-rw-r--r--epan/dissectors/packet-aim-messaging.c4
-rw-r--r--epan/dissectors/packet-ancp.c3
-rw-r--r--epan/dissectors/packet-ansi_683.c3
-rw-r--r--epan/dissectors/packet-ansi_a.c3
-rw-r--r--epan/dissectors/packet-aoe.c2
-rw-r--r--epan/dissectors/packet-armagetronad.c5
-rw-r--r--epan/dissectors/packet-arp.c21
-rw-r--r--epan/dissectors/packet-aruba-erm.c1
-rw-r--r--epan/dissectors/packet-aruba-papi.c4
-rw-r--r--epan/dissectors/packet-asap.c3
-rw-r--r--epan/dissectors/packet-ascend.c3
-rw-r--r--epan/dissectors/packet-asf.c3
-rw-r--r--epan/dissectors/packet-assa_r3.c5
-rw-r--r--epan/dissectors/packet-at.c3
-rw-r--r--epan/dissectors/packet-atalk.c13
-rw-r--r--epan/dissectors/packet-atm.c3
-rw-r--r--epan/dissectors/packet-atmtcp.c1
-rw-r--r--epan/dissectors/packet-auto_rp.c3
-rw-r--r--epan/dissectors/packet-ax25-kiss.c5
-rw-r--r--epan/dissectors/packet-ax25-nol3.c5
-rw-r--r--epan/dissectors/packet-ax25.c5
22 files changed, 74 insertions, 26 deletions
diff --git a/epan/dissectors/packet-3g-a11.c b/epan/dissectors/packet-3g-a11.c
index 0650c77ef5..3acaf1f8ee 100644
--- a/epan/dissectors/packet-3g-a11.c
+++ b/epan/dissectors/packet-3g-a11.c
@@ -52,7 +52,7 @@
/* Forward declarations */
void proto_register_a11(void);
-void proto_register_a11(void);
+void proto_reg_handoff_a11(void);
static int registration_request_msg =0;
diff --git a/epan/dissectors/packet-aim-messaging.c b/epan/dissectors/packet-aim-messaging.c
index 79cf4dc60a..1655b6853b 100644
--- a/epan/dissectors/packet-aim-messaging.c
+++ b/epan/dissectors/packet-aim-messaging.c
@@ -37,6 +37,10 @@
#include "packet-aim.h"
+void proto_register_aim_messaging(void);
+void proto_reg_handoff_aim_messaging(void);
+
+
#define FAMILY_MESSAGING 0x0004
diff --git a/epan/dissectors/packet-ancp.c b/epan/dissectors/packet-ancp.c
index 9c4dd0adab..946897f667 100644
--- a/epan/dissectors/packet-ancp.c
+++ b/epan/dissectors/packet-ancp.c
@@ -69,6 +69,9 @@
_ofst += (4 - ((_len) % 4)); \
} while(0)
+void proto_register_ancp(void);
+void proto_reg_handoff_ancp(void);
+
static int hf_ancp_len = -1;
static int hf_ancp_ver = -1;
static int hf_ancp_mtype = -1;
diff --git a/epan/dissectors/packet-ansi_683.c b/epan/dissectors/packet-ansi_683.c
index e457aae399..a02b3867af 100644
--- a/epan/dissectors/packet-ansi_683.c
+++ b/epan/dissectors/packet-ansi_683.c
@@ -36,6 +36,9 @@
#include <epan/packet.h>
+void proto_register_ansi_683(void);
+void proto_reg_handoff_ansi_683(void);
+
static const char *ansi_proto_name = "ANSI IS-683 (OTA (Mobile))";
static const char *ansi_proto_name_short = "IS-683";
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index 9353447b5a..6dc7ceef37 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -50,8 +50,6 @@
#include "packet-bssap.h"
#include "packet-ansi_a.h"
-void proto_register_ansi_a(void);
-void proto_reg_handoff_ansi_a(void);
/*
* IOS 4, probably most common
@@ -61,6 +59,7 @@ static gint global_a_variant = A_VARIANT_IOS401;
/* PROTOTYPES/FORWARDS */
+void proto_register_ansi_a(void);
void proto_reg_handoff_ansi_a(void);
static const gchar *
diff --git a/epan/dissectors/packet-aoe.c b/epan/dissectors/packet-aoe.c
index f1393b70cc..cb8738c13c 100644
--- a/epan/dissectors/packet-aoe.c
+++ b/epan/dissectors/packet-aoe.c
@@ -257,7 +257,7 @@ dissect_ata_pdu(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset,
}
}
} else {
- ata_info=g_hash_table_lookup(ata_cmd_matched, GUINT_TO_POINTER(pinfo->fd->num));
+ ata_info=(ata_info_t *)g_hash_table_lookup(ata_cmd_matched, GUINT_TO_POINTER(pinfo->fd->num));
}
if(ata_info){
diff --git a/epan/dissectors/packet-armagetronad.c b/epan/dissectors/packet-armagetronad.c
index bcffecd62e..7528daaa12 100644
--- a/epan/dissectors/packet-armagetronad.c
+++ b/epan/dissectors/packet-armagetronad.c
@@ -30,6 +30,9 @@
#include <epan/packet.h>
#include <epan/emem.h>
+void proto_register_armagetronad(void);
+void proto_reg_handoff_armagetronad(void);
+
/* Initialize the protocol and registered fields */
static int proto_armagetronad = -1;
static int hf_armagetronad_descriptor_id = -1;
@@ -150,7 +153,7 @@ add_message_data(tvbuff_t * tvb, gint offset, gint data_len, proto_tree * tree)
if (!tree)
return;
- data = tvb_memcpy(tvb, ep_alloc(data_len + 1), offset, data_len);
+ data = (gchar *)tvb_memcpy(tvb, ep_alloc(data_len + 1), offset, data_len);
data[data_len] = '\0';
for (i = 0; i < data_len; i += 2) {
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c
index 93e52c7546..3afab3f618 100644
--- a/epan/dissectors/packet-arp.c
+++ b/epan/dissectors/packet-arp.c
@@ -41,6 +41,9 @@
#include <epan/prefs.h>
#include <epan/expert.h>
+void proto_register_arp(void);
+void proto_reg_handoff_arp(void);
+
static int proto_arp = -1;
static int hf_arp_hard_type = -1;
static int hf_arp_proto_type = -1;
@@ -398,7 +401,7 @@ atmarpnum_to_str(const guint8 *ad, int ad_tl)
/*
* I'm assuming this means it's an ASCII (IA5) string.
*/
- cur = ep_alloc(MAX_E164_STR_LEN+3+1);
+ cur = (gchar *)ep_alloc(MAX_E164_STR_LEN+3+1);
if (ad_len > MAX_E164_STR_LEN) {
/* Can't show it all. */
memcpy(cur, ad, MAX_E164_STR_LEN);
@@ -607,15 +610,15 @@ address_equal_func(gconstpointer v, gconstpointer v2)
static guint
duplicate_result_hash_func(gconstpointer v)
{
- duplicate_result_key *key = (duplicate_result_key*)v;
+ const duplicate_result_key *key = (const duplicate_result_key*)v;
return (key->frame_number + key->ip_address);
}
static gint
duplicate_result_equal_func(gconstpointer v, gconstpointer v2)
{
- duplicate_result_key *key1 = (duplicate_result_key*)v;
- duplicate_result_key *key2 = (duplicate_result_key*)v2;
+ const duplicate_result_key *key1 = (const duplicate_result_key*)v;
+ const duplicate_result_key *key2 = (const duplicate_result_key*)v2;
return (memcmp(key1, key2, sizeof(duplicate_result_key)) == 0);
}
@@ -637,7 +640,7 @@ check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tree,
/* Look up existing result */
if (pinfo->fd->flags.visited) {
- result = g_hash_table_lookup(duplicate_result_hash_table,
+ result = (address_hash_value *)g_hash_table_lookup(duplicate_result_hash_table,
&result_key);
}
else {
@@ -645,7 +648,7 @@ check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tree,
store result */
/* Look up current assignment of IP address */
- value = g_hash_table_lookup(address_hash_table, GUINT_TO_POINTER(ip));
+ value = (address_hash_value *)g_hash_table_lookup(address_hash_table, GUINT_TO_POINTER(ip));
/* If MAC matches table, just update details */
if (value != NULL)
@@ -661,10 +664,10 @@ check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tree,
else
{
/* Create result and store in result table */
- duplicate_result_key *persistent_key = se_alloc(sizeof(duplicate_result_key));
+ duplicate_result_key *persistent_key = se_new(duplicate_result_key);
memcpy(persistent_key, &result_key, sizeof(duplicate_result_key));
- result = se_alloc(sizeof(address_hash_value));
+ result = se_new(address_hash_value);
memcpy(result, value, sizeof(address_hash_value));
g_hash_table_insert(duplicate_result_hash_table, persistent_key, result);
@@ -674,7 +677,7 @@ check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tree,
else
{
/* No existing entry. Prepare one */
- value = se_alloc(sizeof(struct address_hash_value));
+ value = se_new(struct address_hash_value);
memcpy(value->mac, mac, 6);
value->frame_num = pinfo->fd->num;
value->time_of_entry = pinfo->fd->abs_ts.secs;
diff --git a/epan/dissectors/packet-aruba-erm.c b/epan/dissectors/packet-aruba-erm.c
index 5b887a2be8..cbabd3ab59 100644
--- a/epan/dissectors/packet-aruba-erm.c
+++ b/epan/dissectors/packet-aruba-erm.c
@@ -93,7 +93,6 @@ dissect_aruba_erm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
void
proto_register_aruba_erm(void)
{
- void proto_reg_handoff_aruba_erm(void);
static hf_register_info hf[] = {
diff --git a/epan/dissectors/packet-aruba-papi.c b/epan/dissectors/packet-aruba-papi.c
index 9ce6be41f9..68da68fdbc 100644
--- a/epan/dissectors/packet-aruba-papi.c
+++ b/epan/dissectors/packet-aruba-papi.c
@@ -41,8 +41,8 @@
/* This is not IANA assigned nor registered */
#define UDP_PORT_PAPI 8211
-void proto_register_aruba_papi(void);
-void proto_reg_handoff_aruba_papi(void);
+void proto_register_papi(void);
+void proto_reg_handoff_papi(void);
/* Initialize the protocol and registered fields */
static int proto_papi = -1;
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c
index fd71169ec8..90649dc278 100644
--- a/epan/dissectors/packet-asap.c
+++ b/epan/dissectors/packet-asap.c
@@ -45,6 +45,9 @@
#include <epan/packet.h>
#include <epan/sctpppids.h>
+void proto_register_asap(void);
+void proto_reg_handoff_asap(void);
+
/* Initialize the protocol and registered fields */
static int proto_asap = -1;
static int hf_cause_code = -1;
diff --git a/epan/dissectors/packet-ascend.c b/epan/dissectors/packet-ascend.c
index 601536766b..20ec93aabb 100644
--- a/epan/dissectors/packet-ascend.c
+++ b/epan/dissectors/packet-ascend.c
@@ -26,6 +26,9 @@
#include <glib.h>
#include <epan/packet.h>
+void proto_register_ascend(void);
+void proto_reg_handoff_acend(void);
+
static int proto_ascend = -1;
static int hf_link_type = -1;
static int hf_session_id = -1;
diff --git a/epan/dissectors/packet-asf.c b/epan/dissectors/packet-asf.c
index 5ef665cd6a..269ee68b1d 100644
--- a/epan/dissectors/packet-asf.c
+++ b/epan/dissectors/packet-asf.c
@@ -40,6 +40,9 @@
* http://www.dmtf.org/standards/documents/ASF/DSP0136.pdf
*/
+void proto_register_asf(void);
+void proto_reg_handoff_asf(void);
+
#define RMCP_CLASS_ASF 0x06
static int proto_asf = -1;
diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c
index c7730c480c..f3dbed4060 100644
--- a/epan/dissectors/packet-assa_r3.c
+++ b/epan/dissectors/packet-assa_r3.c
@@ -34,6 +34,9 @@
#include <epan/expert.h>
#include <epan/dissectors/packet-tcp.h>
+void proto_register_r3(void);
+void proto_reg_handoff_r3(void);
+
#if 0
/* */
/* System limits */
@@ -3455,7 +3458,7 @@ static const guint16 ccitt_16 [256] =
static guint16
utilCrcCalculate (const void *ptr, guint16 len, guint16 crc)
{
- const guint8 *p = (guint8 *) ptr;
+ const guint8 *p = (const guint8 *) ptr;
while (len--)
crc = (guint16) ((crc << 8) ^ ccitt_16 [(crc >> 8) ^ *p++]);
diff --git a/epan/dissectors/packet-at.c b/epan/dissectors/packet-at.c
index ff53116d90..9f51bf8abb 100644
--- a/epan/dissectors/packet-at.c
+++ b/epan/dissectors/packet-at.c
@@ -31,6 +31,9 @@
#include <epan/packet.h>
#include <ctype.h>
+void proto_register_at(void);
+void proto_reg_handoff_at(void);
+
static int proto_at = -1;
static int hf_at_command = -1;
diff --git a/epan/dissectors/packet-atalk.c b/epan/dissectors/packet-atalk.c
index f6234451ad..39550718c1 100644
--- a/epan/dissectors/packet-atalk.c
+++ b/epan/dissectors/packet-atalk.c
@@ -45,6 +45,9 @@
#include "packet-atalk.h"
#include "packet-afp.h"
+void proto_register_atalk(void);
+void proto_reg_handoff_atalk(void);
+
/* Tables for reassembly of fragments. */
static GHashTable *atp_fragment_table = NULL;
static GHashTable *atp_reassembled_table = NULL;
@@ -818,10 +821,10 @@ dissect_atp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
we have both a request for 1 packet and a request for n packets,
hopefully most of the time ATP_EOM will be set in the last packet.
*/
- new_request_key = se_alloc(sizeof(asp_request_key));
+ new_request_key = se_new(asp_request_key);
*new_request_key = request_key;
- request_val = se_alloc(sizeof(asp_request_val));
+ request_val = se_new(asp_request_val);
request_val->value = nbe;
g_hash_table_insert(atp_request_hash, new_request_key,request_val);
@@ -1270,7 +1273,7 @@ dissect_pap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
static struct aspinfo *
get_transaction(tvbuff_t *tvb, packet_info *pinfo)
{
- struct aspinfo *aspinfo = pinfo->private_data;
+ struct aspinfo *aspinfo = (struct aspinfo *)pinfo->private_data;
conversation_t *conversation;
asp_request_key request_key, *new_request_key;
asp_request_val *request_val;
@@ -1292,10 +1295,10 @@ get_transaction(tvbuff_t *tvb, packet_info *pinfo)
request_val = (asp_request_val *) g_hash_table_lookup(asp_request_hash, &request_key);
if (!request_val && !aspinfo->reply ) {
fn = tvb_get_guint8(tvb, 0);
- new_request_key = se_alloc(sizeof(asp_request_key));
+ new_request_key = se_new(asp_request_key);
*new_request_key = request_key;
- request_val = se_alloc(sizeof(asp_request_val));
+ request_val = se_new(asp_request_val);
request_val->value = fn;
g_hash_table_insert(asp_request_hash, new_request_key, request_val);
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 715571549c..eebec64989 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -38,6 +38,9 @@
#include <epan/prefs.h>
#include "packet-pw-atm.h"
+void proto_register_atm(void);
+void proto_reg_handoff_atm(void);
+
static int proto_atm = -1;
static int hf_atm_aal = -1;
static int hf_atm_vpi = -1;
diff --git a/epan/dissectors/packet-atmtcp.c b/epan/dissectors/packet-atmtcp.c
index ab01c4b308..38ddf04610 100644
--- a/epan/dissectors/packet-atmtcp.c
+++ b/epan/dissectors/packet-atmtcp.c
@@ -35,6 +35,7 @@
#include <epan/packet.h>
#include <epan/prefs.h>
+void proto_register_atmtcp(void);
void proto_reg_handoff_atmtcp(void);
static int proto_atmtcp = -1;
diff --git a/epan/dissectors/packet-auto_rp.c b/epan/dissectors/packet-auto_rp.c
index 9492a1e03c..b05cbb08f3 100644
--- a/epan/dissectors/packet-auto_rp.c
+++ b/epan/dissectors/packet-auto_rp.c
@@ -30,6 +30,9 @@
#include <glib.h>
#include <epan/packet.h>
+void proto_register_auto_rp(void);
+void proto_reg_handoff_auto_rp(void);
+
static gint proto_auto_rp = -1;
static gint ett_auto_rp = -1;
static gint ett_auto_rp_ver_type = -1;
diff --git a/epan/dissectors/packet-ax25-kiss.c b/epan/dissectors/packet-ax25-kiss.c
index 80cef60e25..0af029b112 100644
--- a/epan/dissectors/packet-ax25-kiss.c
+++ b/epan/dissectors/packet-ax25-kiss.c
@@ -128,6 +128,9 @@
#define KISS_CMD_MASK 0x0f
#define KISS_PORT_MASK 0xf0
+void proto_register_ax25_kiss(void);
+void proto_reg_handoff_ax25_kiss(void);
+
/* Dissector handles - all the possibles are listed */
static dissector_handle_t ax25_handle;
@@ -205,7 +208,7 @@ dissect_ax25_kiss( tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
void *saved_private_data;
tvbuff_t *next_tvb = NULL;
- info_buffer = ep_alloc( STRLEN );
+ info_buffer = (char *)ep_alloc( STRLEN );
info_buffer[0] = '\0';
col_set_str( pinfo->cinfo, COL_PROTOCOL, "AX.25 KISS" );
diff --git a/epan/dissectors/packet-ax25-nol3.c b/epan/dissectors/packet-ax25-nol3.c
index 415ccece25..e7351be53a 100644
--- a/epan/dissectors/packet-ax25-nol3.c
+++ b/epan/dissectors/packet-ax25-nol3.c
@@ -57,6 +57,9 @@
#define STRLEN 80
+void proto_register_ax25_nol3(void);
+void proto_reg_handoff_ax25_nol3(void);
+
/* Dissector handles - all the possibles are listed */
static dissector_handle_t aprs_handle;
static dissector_handle_t default_handle;
@@ -160,7 +163,7 @@ dissect_ax25_nol3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
guint8 dti = 0;
gboolean dissected;
- info_buffer = ep_alloc( STRLEN );
+ info_buffer = (char *)ep_alloc( STRLEN );
info_buffer[0] = '\0';
col_set_str( pinfo->cinfo, COL_PROTOCOL, "AX.25-NoL3");
diff --git a/epan/dissectors/packet-ax25.c b/epan/dissectors/packet-ax25.c
index 676aa4a50f..03112859d8 100644
--- a/epan/dissectors/packet-ax25.c
+++ b/epan/dissectors/packet-ax25.c
@@ -64,6 +64,9 @@
#define AX25_HEADER_SIZE 15 /* length of src_addr + dst_addr + cntl */
#define AX25_MAX_DIGIS 8
+void proto_register_ax25(void);
+void proto_reg_handoff_ax25(void);
+
/* Dissector table */
static dissector_table_t ax25_dissector_table;
@@ -147,7 +150,7 @@ dissect_ax25( tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree )
tvbuff_t *next_tvb = NULL;
- info_buffer = ep_alloc( STRLEN );
+ info_buffer = (char *)ep_alloc( STRLEN );
info_buffer[0] = '\0';
col_set_str( pinfo->cinfo, COL_PROTOCOL, "AX.25" );