- [-Wmissing-prototypes]

- explicit casts.

svn path=/trunk/; revision=48282
This commit is contained in:
Anders Broman 2013-03-13 21:14:20 +00:00
parent c63dfc2ab4
commit 04766017df
22 changed files with 74 additions and 26 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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";

View File

@ -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 *

View File

@ -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){

View File

@ -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) {

View File

@ -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;

View File

@ -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[] = {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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++]);

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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" );

View File

@ -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");

View File

@ -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" );