Fix warnings

svn path=/trunk/; revision=53885
This commit is contained in:
Jakub Zawadzki 2013-12-09 20:15:47 +00:00
parent 8aebe15965
commit 3ae2e5ece2
29 changed files with 30 additions and 37 deletions

View File

@ -24,7 +24,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "config.h"

View File

@ -10052,9 +10052,6 @@ static int dissect_bss_max_idle_period(proto_tree *tree, tvbuff_t *tvb,
return offset;
}
static int add_tagged_field(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb,
int offset, int ftype);
enum tfs_request_subelem_id {
TFS_REQ_SUBELEM_TFS = 1,
TFS_REQ_SUBELEM_VENDOR_SPECIFIC = 221

View File

@ -88,7 +88,7 @@ enum {
WS_RTM_GETNETCONF = 82,
WS_RTM_NEWMDB = 84,
WS_RTM_DELMDB = 85,
WS_RTM_GETMDB = 86,
WS_RTM_GETMDB = 86
};
/* values for rta_type (network interface) from <linux/if_link.h> */
@ -138,7 +138,7 @@ enum ws_ifa_attr_type {
WS_IFA_BROADCAST = 4,
WS_IFA_ANYCAST = 5,
WS_IFA_CACHEINFO = 6,
WS_IFA_MULTICAST = 7,
WS_IFA_MULTICAST = 7
};
/* values for rta_type (route) from <linux/rtnetlink.h> */
@ -231,7 +231,7 @@ enum {
WS_IFF_DYNAMIC = 0x8000,
WS_IFF_LOWER_UP = 0x10000,
WS_IFF_DORMANT = 0x20000,
WS_IFF_ECHO = 0x40000,
WS_IFF_ECHO = 0x40000
};
/* values for ifaddrmsg.ifa_flags <linux/if_addr.h> */

View File

@ -1236,7 +1236,7 @@ extern gint
stat_node_array_sortcmp (gconstpointer a, gconstpointer b, gpointer user_data)
{
/* user_data is *guint value to st_flags */
return stats_tree_sort_compare (*(stat_node**)a,*(stat_node**)b,
return stats_tree_sort_compare (*(const stat_node**)a,*(const stat_node**)b,
((sortinfo*)user_data)->sort_column,((sortinfo*)user_data)->sort_descending);
}

View File

@ -93,8 +93,6 @@ static struct tcaphash_context_t *tcaphash_end_matching(tvbuff_t *tvb, packet_in
static struct tcaphash_context_t *tcaphash_ansi_matching(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
struct tcapsrt_info_t *p_tcapsrt_info);
struct tcapsrt_info_t *tcapsrt_razinfo(void);
/* When several Tcap components are received in a single TCAP message,
we have to use several buffers for the stored parameters
because else this data are erased during TAP dissector call */

View File

@ -297,8 +297,6 @@ static const char fast_strings[][4] = {
"248", "249", "250", "251", "252", "253", "254", "255"
};
char *uint_to_str_back(char *ptr, guint32 value);
void
guint32_to_str_buf(guint32 u, gchar *buf, int buf_len) {
int str_len = guint32_to_str_buf_len(u)+1;

View File

@ -41,7 +41,7 @@
static int
eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const eth_hdr *ehdr=(eth_hdr *)vip;
const eth_hdr *ehdr=(const eth_hdr *)vip;
add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_ETHER, PT_NONE);

View File

@ -44,7 +44,7 @@
static int
fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const fc_hdr *fchdr=(fc_hdr *)vip;
const fc_hdr *fchdr=(const fc_hdr *)vip;
add_conversation_table_data((conversations_table *)pct, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);

View File

@ -41,7 +41,7 @@
static int
fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const fddi_hdr *ehdr=(fddi_hdr *)vip;
const fddi_hdr *ehdr=(const fddi_hdr *)vip;
add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_FDDI, PT_NONE);

View File

@ -41,7 +41,7 @@
static int
ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const ws_ip *iph=(ws_ip *)vip;
const ws_ip *iph=(const ws_ip *)vip;
add_conversation_table_data((conversations_table *)pct, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);

View File

@ -41,7 +41,7 @@
static int
ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const struct ip6_hdr *ip6h = (struct ip6_hdr *)vip;
const struct ip6_hdr *ip6h = (const struct ip6_hdr *)vip;
address src;
address dst;

View File

@ -42,7 +42,7 @@
static int
ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const ipxhdr_t *ipxh=(ipxhdr_t *)vip;
const ipxhdr_t *ipxh=(const ipxhdr_t *)vip;
add_conversation_table_data((conversations_table *)pct, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_NONE);

View File

@ -41,7 +41,7 @@
static int
ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const struct ncp_common_header *ncph=(struct ncp_common_header *)vip;
const struct ncp_common_header *ncph=(const struct ncp_common_header *)vip;
guint32 connection;
connection = (ncph->conn_high * 256)+ncph->conn_low;

View File

@ -41,7 +41,7 @@
static int
rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const rsvp_conversation_info *rsvph = (rsvp_conversation_info *)vip;
const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip;
add_conversation_table_data((conversations_table *)pct,
&rsvph->source, &rsvph->destination, 0, 0, 1,

View File

@ -41,7 +41,7 @@
static int
sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const struct _sctp_info *sctphdr=(struct _sctp_info *)vip;
const struct _sctp_info *sctphdr=(const struct _sctp_info *)vip;
add_conversation_table_data((conversations_table *)pct,
&sctphdr->ip_src,

View File

@ -41,7 +41,7 @@
static int
tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const struct tcpheader *tcphdr=(struct tcpheader *)vip;
const struct tcpheader *tcphdr=(const struct tcpheader *)vip;
add_conversation_table_data_with_conv_id((conversations_table *)pct, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_TCP);

View File

@ -41,7 +41,7 @@
static int
tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const tr_hdr *trhdr=(tr_hdr *)vip;
const tr_hdr *trhdr=(const tr_hdr *)vip;
add_conversation_table_data((conversations_table *)pct, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_TOKENRING, PT_NONE);

View File

@ -41,7 +41,7 @@
static int
udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const e_udphdr *udphdr=(e_udphdr *)vip;
const e_udphdr *udphdr=(const e_udphdr *)vip;
add_conversation_table_data((conversations_table *)pct, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_NONE, PT_UDP);

View File

@ -41,7 +41,7 @@
static int
wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
const wlan_hdr *whdr=(wlan_hdr *)vip;
const wlan_hdr *whdr=(const wlan_hdr *)vip;
add_conversation_table_data((conversations_table *)pct, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->rel_ts, SAT_WLAN, PT_NONE);

View File

@ -45,7 +45,7 @@ static int
fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const fc_hdr *fchdr=(fc_hdr *)vip;
const fc_hdr *fchdr=(const fc_hdr *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -42,7 +42,7 @@ static int
fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const fddi_hdr *ehdr=(fddi_hdr *)vip;
const fddi_hdr *ehdr=(const fddi_hdr *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -44,7 +44,7 @@ static int
ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const ws_ip *iph=(ws_ip *)vip;
const ws_ip *iph=(const ws_ip *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -45,7 +45,7 @@ static int
ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts = (hostlist_table *)pit;
const struct ip6_hdr *ip6h = (struct ip6_hdr *)vip;
const struct ip6_hdr *ip6h = (const struct ip6_hdr *)vip;
address src;
address dst;

View File

@ -42,7 +42,7 @@ static int
ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const ipxhdr_t *ipxh=(ipxhdr_t *)vip;
const ipxhdr_t *ipxh=(const ipxhdr_t *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -42,7 +42,7 @@ static int
jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts = (hostlist_table *) pit;
const jxta_tap_header *jxtahdr = (jxta_tap_header *)vip;
const jxta_tap_header *jxtahdr = (const jxta_tap_header *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -43,7 +43,7 @@ static int
rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const rsvp_conversation_info *rsvph = (rsvp_conversation_info *)vip;
const rsvp_conversation_info *rsvph = (const rsvp_conversation_info *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures
* that all packets are counted properly (even if address is sending to

View File

@ -41,7 +41,7 @@ static int
sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const struct _sctp_info *sctphdr=(struct _sctp_info *)vip;
const struct _sctp_info *sctphdr=(const struct _sctp_info *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -42,7 +42,7 @@ static int
udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
hostlist_table *hosts=(hostlist_table *)pit;
const e_udphdr *udphdr=(e_udphdr *)vip;
const e_udphdr *udphdr=(const e_udphdr *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted properly (even if address is sending to itself)

View File

@ -430,7 +430,7 @@ time_shift_apply_cb(GtkWidget *ok_bt _U_, GtkWindow *parent_w)
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(flag_rb)) == TRUE) {
packetnumber_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_SETTIME_PACKETNUMBER_KEY);
packet_num = (guint)strtol((char *)gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
packet_num = (guint)strtol(gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
time_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_SETTIME_TIME_KEY);
time_text = gtk_entry_get_text(GTK_ENTRY(time_te));
@ -443,14 +443,14 @@ time_shift_apply_cb(GtkWidget *ok_bt _U_, GtkWindow *parent_w)
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(flag_rb)) == TRUE) {
packetnumber_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_ADJTIME_PACKETNUMBER1_KEY);
packet_num = (guint)strtol((char *)gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
packet_num = (guint)strtol(gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
time_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_ADJTIME_TIME1_KEY);
time_text = gtk_entry_get_text(GTK_ENTRY(time_te));
packetnumber_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_ADJTIME_PACKETNUMBER2_KEY);
packet2_num = (guint)strtol((char *)gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
packet2_num = (guint)strtol(gtk_entry_get_text(GTK_ENTRY(packetnumber_te)), NULL, 10);
time_te = (GtkWidget *)g_object_get_data(G_OBJECT(parent_w),
E_ADJTIME_TIME2_KEY);
time2_text = gtk_entry_get_text(GTK_ENTRY(time_te));