aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2013-03-15 06:26:47 +0000
committerAnders Broman <anders.broman@ericsson.com>2013-03-15 06:26:47 +0000
commitef249623e636f650138419de0e42db84c53f3263 (patch)
tree469c739dd566a492e46ef7d5cb8cb0e57bc684cb /epan
parentaa3ebebefeb74119ce253f19cf1fa44670131d5f (diff)
[-Wmissing-prototypes]
Use explicit casts. svn path=/trunk/; revision=48313
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bssgp.c6
-rw-r--r--epan/dissectors/packet-calcappprotocol.c2
-rw-r--r--epan/dissectors/packet-canopen.c2
-rw-r--r--epan/dissectors/packet-cast.c2
-rw-r--r--epan/dissectors/packet-cdp.c5
-rw-r--r--epan/dissectors/packet-cgmp.c2
-rw-r--r--epan/dissectors/packet-chdlc.c5
-rw-r--r--epan/dissectors/packet-cigi.c6
-rw-r--r--epan/dissectors/packet-cimd.c2
-rw-r--r--epan/dissectors/packet-cimetrics.c3
-rw-r--r--epan/dissectors/packet-cip.c25
-rw-r--r--epan/dissectors/packet-cipmotion.c1
-rw-r--r--epan/dissectors/packet-cipsafety.c3
-rw-r--r--epan/dissectors/packet-cisco-oui.c2
-rw-r--r--epan/dissectors/packet-cisco-sm.c3
-rw-r--r--epan/dissectors/packet-classicstun.c15
-rw-r--r--epan/dissectors/packet-clearcase.c3
-rw-r--r--epan/dissectors/packet-clip.c3
-rw-r--r--epan/dissectors/packet-clique-rm.c3
-rw-r--r--epan/dissectors/packet-clnp.c3
-rw-r--r--epan/dissectors/packet-cmpp.c3
-rw-r--r--epan/dissectors/packet-coap.c2
22 files changed, 80 insertions, 21 deletions
diff --git a/epan/dissectors/packet-bssgp.c b/epan/dissectors/packet-bssgp.c
index b2492d925e..62824f0136 100644
--- a/epan/dissectors/packet-bssgp.c
+++ b/epan/dissectors/packet-bssgp.c
@@ -72,6 +72,10 @@
*/
#define BSSGP_SEP ", "
+
+void proto_register_bssgp(void);
+void proto_reg_handoff_bssgp(void);
+
static int bssgp_decode_nri = 0;
static guint bssgp_nri_length = 4;
@@ -6338,7 +6342,7 @@ static void (*bssgp_msg_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
NULL, /* NONE */
};
-void get_bssgp_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
+static void get_bssgp_msg_params(guint8 oct, const gchar **msg_str, int *ett_tree, int *hf_idx, msg_fcn *msg_fcn_p)
{
gint idx;
diff --git a/epan/dissectors/packet-calcappprotocol.c b/epan/dissectors/packet-calcappprotocol.c
index 14fd11be3c..ffa5e5c5ec 100644
--- a/epan/dissectors/packet-calcappprotocol.c
+++ b/epan/dissectors/packet-calcappprotocol.c
@@ -36,6 +36,8 @@
#define CALCAPPPROTOCOL_PAYLOAD_PROTOCOL_ID_LEGACY 0x29097603
+void proto_register_calcappprotocol(void);
+void proto_reg_handoff_calcappprotocol(void);
/* Initialize the protocol and registered fields */
static int proto_calcappprotocol = -1;
diff --git a/epan/dissectors/packet-canopen.c b/epan/dissectors/packet-canopen.c
index e4f192b2fd..a2b5b3577f 100644
--- a/epan/dissectors/packet-canopen.c
+++ b/epan/dissectors/packet-canopen.c
@@ -29,6 +29,8 @@
#include <epan/packet.h>
+void proto_register_canopen(void);
+
/* Initialize the protocol and registered fields */
static int proto_canopen = -1;
static int hf_canopen_cob_id = -1;
diff --git a/epan/dissectors/packet-cast.c b/epan/dissectors/packet-cast.c
index ebf0d00ac6..b3b076b318 100644
--- a/epan/dissectors/packet-cast.c
+++ b/epan/dissectors/packet-cast.c
@@ -33,6 +33,8 @@
#define TCP_PORT_CAST 4224
+void proto_register_cast(void);
+void proto_reg_handoff_cast(void);
/* I will probably need this again when I change things
* to function pointers, but let me use the existing
diff --git a/epan/dissectors/packet-cdp.c b/epan/dissectors/packet-cdp.c
index 3558a8bbce..038e5dc2d7 100644
--- a/epan/dissectors/packet-cdp.c
+++ b/epan/dissectors/packet-cdp.c
@@ -50,6 +50,9 @@
* for some more information on CDP version 2.
*/
+void proto_register_cdp(void);
+void proto_reg_handoff_cdp(void);
+
/* Offsets in TLV structure. */
#define TLV_TYPE 0
#define TLV_LENGTH 2
@@ -242,7 +245,7 @@ dissect_cdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (data_length & 1) {
guint8 *padded_buffer;
/* Allocate new buffer */
- padded_buffer = ep_alloc(data_length+1);
+ padded_buffer = (guint8 *)ep_alloc(data_length+1);
tvb_memcpy(tvb, padded_buffer, 0, data_length);
/* Swap bytes in last word */
padded_buffer[data_length] = padded_buffer[data_length-1];
diff --git a/epan/dissectors/packet-cgmp.c b/epan/dissectors/packet-cgmp.c
index 69cd352044..4440e7f2d2 100644
--- a/epan/dissectors/packet-cgmp.c
+++ b/epan/dissectors/packet-cgmp.c
@@ -35,6 +35,8 @@
*
* for some information on CGMP.
*/
+void proto_register_cgmp(void);
+void proto_reg_handoff_cgmp(void);
static int proto_cgmp = -1;
static int hf_cgmp_version = -1;
diff --git a/epan/dissectors/packet-chdlc.c b/epan/dissectors/packet-chdlc.c
index 65e029812a..2357b76804 100644
--- a/epan/dissectors/packet-chdlc.c
+++ b/epan/dissectors/packet-chdlc.c
@@ -41,6 +41,11 @@
* http://www.nethelp.no/net/cisco-hdlc.txt
*/
+void proto_register_chdlc(void);
+void proto_reg_handoff_chdlc(void);
+void proto_register_slarp(void);
+void proto_reg_handoff_slarp(void);
+
static int proto_chdlc = -1;
static int hf_chdlc_addr = -1;
static int hf_chdlc_proto = -1;
diff --git a/epan/dissectors/packet-cigi.c b/epan/dissectors/packet-cigi.c
index abf9024a07..ddfb9c5e4c 100644
--- a/epan/dissectors/packet-cigi.c
+++ b/epan/dissectors/packet-cigi.c
@@ -37,7 +37,9 @@
#include <epan/prefs.h>
/* Forward declaration */
+void proto_register_cigi(void);
void proto_reg_handoff_cigi(void);
+
static gboolean packet_is_cigi(tvbuff_t*);
static void dissect_cigi_pdu(tvbuff_t*, packet_info*, proto_tree*);
static void cigi_add_tree(tvbuff_t*, proto_tree*);
@@ -2635,14 +2637,14 @@ dissect_cigi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
/* Format the Info String */
- src_str = ip_to_str(pinfo->src.data);
+ src_str = (const char*)ip_to_str(pinfo->src.data);
if ( !g_ascii_strcasecmp(global_host_ip, src_str) ) {
src_str = "Host";
} else if ( !g_ascii_strcasecmp(global_ig_ip, src_str) ) {
src_str = "IG";
}
- dest_str = ip_to_str(pinfo->dst.data);
+ dest_str = (const char*)ip_to_str(pinfo->dst.data);
if ( !g_ascii_strcasecmp(global_host_ip, dest_str) ) {
dest_str = "Host";
} else if ( !g_ascii_strcasecmp(global_ig_ip, dest_str) ) {
diff --git a/epan/dissectors/packet-cimd.c b/epan/dissectors/packet-cimd.c
index ccc7d4219c..e8e565b26f 100644
--- a/epan/dissectors/packet-cimd.c
+++ b/epan/dissectors/packet-cimd.c
@@ -126,6 +126,8 @@ struct cimd_parameter_t {
gint *hf_p;
};
+void proto_register_cimd(void);
+void proto_reg_handoff_cimd(void);
static void dissect_cimd_parameter(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset);
static void dissect_cimd_ud(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset);
static void dissect_cimd_dcs(tvbuff_t *tvb, proto_tree *tree, gint pindex, gint startOffset, gint endOffset);
diff --git a/epan/dissectors/packet-cimetrics.c b/epan/dissectors/packet-cimetrics.c
index ea5dc00f32..598b4ba28a 100644
--- a/epan/dissectors/packet-cimetrics.c
+++ b/epan/dissectors/packet-cimetrics.c
@@ -32,6 +32,9 @@
#include <epan/oui.h>
#include "packet-mstp.h"
+void proto_register_cimetrics(void);
+void proto_reg_handoff_cimetrics(void);
+
/* Probably should be a preference, but here for now */
#define BACNET_MSTP_SUMMARY_IN_TREE
diff --git a/epan/dissectors/packet-cip.c b/epan/dissectors/packet-cip.c
index 9f6f9a1ec3..26b7d6e3be 100644
--- a/epan/dissectors/packet-cip.c
+++ b/epan/dissectors/packet-cip.c
@@ -51,6 +51,9 @@
#define ENIP_CIP_INTERFACE 0
+void proto_register_cip(void);
+void proto_reg_handoff_cip(void);
+
typedef struct mr_mult_req_info {
guint8 service;
int num_services;
@@ -4232,10 +4235,10 @@ dissect_cip_multiple_service_packet_req(tvbuff_t *tvb, packet_info *pinfo, proto
{
if ( cip_req_info->pData == NULL )
{
- mr_mult_req_info = se_alloc(sizeof(mr_mult_req_info_t));
+ mr_mult_req_info = se_new(mr_mult_req_info_t);
mr_mult_req_info->service = SC_MULT_SERV_PACK;
mr_mult_req_info->num_services = num_services;
- mr_mult_req_info->requests = se_alloc0(sizeof(cip_req_info_t)*num_services);
+ mr_mult_req_info->requests = (cip_req_info_t *)se_alloc0(sizeof(cip_req_info_t)*num_services);
cip_req_info->pData = mr_mult_req_info;
}
else
@@ -4884,7 +4887,7 @@ dissect_cip_cm_fwd_open_req(cip_req_info_t *preq_info, proto_tree *cmd_tree, tvb
if (preq_info != NULL)
{
DISSECTOR_ASSERT(preq_info->connInfo == NULL);
- preq_info->connInfo = se_alloc0(sizeof(cip_conn_info_t));
+ preq_info->connInfo = se_new0(cip_conn_info_t);
preq_info->connInfo->ConnSerialNumber = ConnSerialNumber;
preq_info->connInfo->VendorID = VendorID;
@@ -5317,13 +5320,13 @@ dissect_cip_cm_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
col_append_str( pinfo->cinfo, COL_INFO, ": ");
next_tvb = tvb_new_subset(tvb, offset+2+req_path_size+4, msg_req_siz, msg_req_siz);
- preq_info = p_get_proto_data( pinfo->fd, proto_cip );
+ preq_info = (cip_req_info_t *)p_get_proto_data( pinfo->fd, proto_cip );
pembedded_req_info = NULL;
if ( preq_info )
{
if ( preq_info->pData == NULL )
{
- pembedded_req_info = (cip_req_info_t*)se_alloc0(sizeof(cip_req_info_t));
+ pembedded_req_info = se_new0(cip_req_info_t);
preq_info->pData = pembedded_req_info;
}
else
@@ -5479,7 +5482,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
next_tvb = tvb_new_subset( tvb, offset+4+add_stat_size, item_length-4-add_stat_size, item_length-4-add_stat_size);
/* keep packet context */
- request_info = ep_alloc(sizeof(modbus_request_info_t));
+ request_info = ep_new(modbus_request_info_t);
request_info->packet_type = RESPONSE_PACKET;
request_info->register_addr_type = MBTCP_PREF_REGISTER_ADDR_RAW;
request_info->register_format = MBTCP_PREF_REGISTER_FORMAT_UINT16;
@@ -5569,7 +5572,7 @@ dissect_cip_mb_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, int item_
next_tvb = tvb_new_subset( tvb, offset+2+req_path_size, item_length-req_path_size-2, item_length-req_path_size-2);
/* keep packet context */
- request_info = ep_alloc(sizeof(modbus_request_info_t));
+ request_info = ep_new(modbus_request_info_t);
request_info->packet_type = QUERY_PACKET;
request_info->register_addr_type = MBTCP_PREF_REGISTER_ADDR_RAW;
request_info->register_format = MBTCP_PREF_REGISTER_FORMAT_UINT16;
@@ -6114,7 +6117,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info
{
tvbuff_t* tvbIOI;
- tvbIOI = tvb_new_real_data( preq_info->pIOI, preq_info->IOILen * 2, preq_info->IOILen * 2);
+ tvbIOI = tvb_new_real_data((const guint8 *)preq_info->pIOI, preq_info->IOILen * 2, preq_info->IOILen * 2);
if ( tvbIOI )
{
pi = proto_tree_add_text( cip_tree, NULL, 0, 0, "Request Path Size: %d (words)", preq_info->IOILen );
@@ -6124,7 +6127,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info
pi = proto_tree_add_text(cip_tree, NULL, 0, 0, "Request Path: ");
PROTO_ITEM_SET_GENERATED(pi);
- preq_info->ciaData = se_alloc(sizeof(cip_simple_request_info_t));
+ preq_info->ciaData = se_new(cip_simple_request_info_t);
dissect_epath( tvbIOI, pinfo, pi, 0, preq_info->IOILen*2, TRUE, FALSE, preq_info->ciaData, NULL);
tvb_free(tvbIOI);
}
@@ -6163,7 +6166,7 @@ dissect_cip_data( proto_tree *item_tree, tvbuff_t *tvb, int offset, packet_info
pi = proto_tree_add_text(cip_tree, tvb, offset+2, req_path_size*2, "Request Path: ");
if (preq_info)
{
- preq_info->ciaData = se_alloc(sizeof(cip_simple_request_info_t));
+ preq_info->ciaData = se_new(cip_simple_request_info_t);
dissect_epath( tvb, pinfo, pi, offset+2, req_path_size*2, FALSE, FALSE, preq_info->ciaData, NULL);
memcpy(&path_info, preq_info->ciaData, sizeof(cip_simple_request_info_t));
}
@@ -6252,7 +6255,7 @@ dissect_cip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
preq_info = enip_info->cip_info;
if ( preq_info == NULL )
{
- preq_info = se_alloc0( sizeof( cip_req_info_t ) );
+ preq_info = se_new0(cip_req_info_t);
enip_info->cip_info = preq_info;
}
dissect_cip_data( tree, tvb, 0, pinfo, enip_info->cip_info );
diff --git a/epan/dissectors/packet-cipmotion.c b/epan/dissectors/packet-cipmotion.c
index 4da839f99c..2af404373c 100644
--- a/epan/dissectors/packet-cipmotion.c
+++ b/epan/dissectors/packet-cipmotion.c
@@ -31,6 +31,7 @@
#include <epan/packet.h>
#include "packet-cip.h"
+void proto_register_cipmotion(void);
/* The entry point to the actual disection is: dissect_cipmotion */
/* Protocol handle for CIP Motion */
diff --git a/epan/dissectors/packet-cipsafety.c b/epan/dissectors/packet-cipsafety.c
index 5481d7aede..c25138cae1 100644
--- a/epan/dissectors/packet-cipsafety.c
+++ b/epan/dissectors/packet-cipsafety.c
@@ -34,6 +34,9 @@
#include "packet-enip.h"
#include "packet-cipsafety.h"
+
+void proto_register_cipsafety(void);
+void proto_reg_handoff_cipsafety(void);
/* The entry point to the actual disection is: dissect_cipsafety */
/* Protocol handle for CIP Safety */
diff --git a/epan/dissectors/packet-cisco-oui.c b/epan/dissectors/packet-cisco-oui.c
index 2ba582d318..98504f109e 100644
--- a/epan/dissectors/packet-cisco-oui.c
+++ b/epan/dissectors/packet-cisco-oui.c
@@ -28,6 +28,8 @@
#include "packet-llc.h"
#include <epan/oui.h>
+void proto_register_cisco_oui(void);
+
static int hf_llc_cisco_pid = -1;
/*
diff --git a/epan/dissectors/packet-cisco-sm.c b/epan/dissectors/packet-cisco-sm.c
index 5cfc0d8ec5..4882524f20 100644
--- a/epan/dissectors/packet-cisco-sm.c
+++ b/epan/dissectors/packet-cisco-sm.c
@@ -55,6 +55,9 @@
#define MESSAGE_TYPE_Q_RESET_RESPONSE 9
#define MESSAGE_TYPE_PDU 0x8000
+void proto_register_sm(void);
+void proto_reg_handoff_sm(void);
+
static const value_string sm_message_type_value[] = {
{ MESSAGE_TYPE_START, "Start Message" },
{ MESSAGE_TYPE_STOP, "Stop Message" },
diff --git a/epan/dissectors/packet-classicstun.c b/epan/dissectors/packet-classicstun.c
index 6b79359426..af62914706 100644
--- a/epan/dissectors/packet-classicstun.c
+++ b/epan/dissectors/packet-classicstun.c
@@ -33,6 +33,9 @@
#include <epan/packet.h>
#include <epan/conversation.h>
+void proto_register_classicstun(void);
+void proto_reg_handoff_classicstun(void);
+
/* Initialize the protocol and registered fields */
static int proto_classicstun = -1;
@@ -277,12 +280,12 @@ dissect_classicstun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
/*
* Do we already have a state structure for this conv
*/
- classicstun_info = conversation_get_proto_data(conversation, proto_classicstun);
+ classicstun_info = (classicstun_conv_info_t *)conversation_get_proto_data(conversation, proto_classicstun);
if (!classicstun_info) {
/* No. Attach that information to the conversation, and add
* it to the list of information structures.
*/
- classicstun_info = se_alloc(sizeof(classicstun_conv_info_t));
+ classicstun_info = se_new(classicstun_conv_info_t);
classicstun_info->pdus=se_tree_create_non_persistent(EMEM_TREE_TYPE_RED_BLACK, "classicstun_pdus");
conversation_add_proto_data(conversation, proto_classicstun, classicstun_info);
}
@@ -290,25 +293,25 @@ dissect_classicstun(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
if(!pinfo->fd->flags.visited){
if (((msg_type & CLASS_MASK) >> 4) == REQUEST) {
/* This is a request */
- classicstun_trans=se_alloc(sizeof(classicstun_transaction_t));
+ classicstun_trans=se_new(classicstun_transaction_t);
classicstun_trans->req_frame=pinfo->fd->num;
classicstun_trans->rep_frame=0;
classicstun_trans->req_time=pinfo->fd->abs_ts;
se_tree_insert32_array(classicstun_info->pdus, transaction_id_key,
(void *)classicstun_trans);
} else {
- classicstun_trans=se_tree_lookup32_array(classicstun_info->pdus,
+ classicstun_trans=(classicstun_transaction_t *)se_tree_lookup32_array(classicstun_info->pdus,
transaction_id_key);
if(classicstun_trans){
classicstun_trans->rep_frame=pinfo->fd->num;
}
}
} else {
- classicstun_trans=se_tree_lookup32_array(classicstun_info->pdus, transaction_id_key);
+ classicstun_trans=(classicstun_transaction_t *)se_tree_lookup32_array(classicstun_info->pdus, transaction_id_key);
}
if(!classicstun_trans){
/* create a "fake" pana_trans structure */
- classicstun_trans=ep_alloc(sizeof(classicstun_transaction_t));
+ classicstun_trans=ep_new(classicstun_transaction_t);
classicstun_trans->req_frame=0;
classicstun_trans->rep_frame=0;
classicstun_trans->req_time=pinfo->fd->abs_ts;
diff --git a/epan/dissectors/packet-clearcase.c b/epan/dissectors/packet-clearcase.c
index fce7e7f3e6..eb4e857fdc 100644
--- a/epan/dissectors/packet-clearcase.c
+++ b/epan/dissectors/packet-clearcase.c
@@ -31,6 +31,9 @@
#include "packet-rpc.h"
#include "packet-clearcase.h"
+void proto_register_clearcase(void);
+void proto_reg_handoff_clearcase(void);
+
static int proto_clearcase = -1;
static int hf_clearcase_procedure_v3 = -1;
diff --git a/epan/dissectors/packet-clip.c b/epan/dissectors/packet-clip.c
index 63daa97904..c114a95516 100644
--- a/epan/dissectors/packet-clip.c
+++ b/epan/dissectors/packet-clip.c
@@ -32,6 +32,9 @@
#include "packet-clip.h"
#include "packet-ip.h"
+void proto_register_clip(void);
+void proto_reg_handoff_clip(void);
+
static gint ett_clip = -1;
static dissector_handle_t ip_handle;
diff --git a/epan/dissectors/packet-clique-rm.c b/epan/dissectors/packet-clique-rm.c
index c8fbc2531b..37f7f43841 100644
--- a/epan/dissectors/packet-clique-rm.c
+++ b/epan/dissectors/packet-clique-rm.c
@@ -29,6 +29,9 @@
#include <glib.h>
#include <epan/packet.h>
+void proto_register_clique_rm(void);
+void proto_reg_handoff_clique_rm(void);
+
/* Initialize the protocol and registered fields */
static int proto_clique_rm = -1;
diff --git a/epan/dissectors/packet-clnp.c b/epan/dissectors/packet-clnp.c
index 0557a68309..8cd2791d94 100644
--- a/epan/dissectors/packet-clnp.c
+++ b/epan/dissectors/packet-clnp.c
@@ -37,6 +37,9 @@
#include <epan/nlpid.h>
#include <epan/ipproto.h>
+void proto_register_clnp(void);
+void proto_reg_handoff_clnp(void);
+
/* protocols and fields */
static int proto_clnp = -1;
diff --git a/epan/dissectors/packet-cmpp.c b/epan/dissectors/packet-cmpp.c
index 24e2e60df8..4699a6bced 100644
--- a/epan/dissectors/packet-cmpp.c
+++ b/epan/dissectors/packet-cmpp.c
@@ -37,6 +37,9 @@
#define CMPP_ISMG_LONG_PORT 7930
#define CMPP_ISMG_SHORT_PORT 9168
+void proto_register_cmpp(void);
+void proto_reg_handoff_cmpp(void);
+
/* Initialize the protocol and registered fields */
static gint proto_cmpp = -1;
diff --git a/epan/dissectors/packet-coap.c b/epan/dissectors/packet-coap.c
index a71f0976a4..9062a7c9bc 100644
--- a/epan/dissectors/packet-coap.c
+++ b/epan/dissectors/packet-coap.c
@@ -35,6 +35,8 @@
#include <epan/prefs.h>
#include <expert.h>
+void proto_register_coap(void);
+
static dissector_table_t media_type_dissector_table;
static int proto_coap = -1;