aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/sctp_stat.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-08-24 14:30:55 +0000
committerBill Meier <wmeier@newsguy.com>2009-08-24 14:30:55 +0000
commita8e3b5d7587ba0ca19e28782239d06e93b7a69be (patch)
tree63fe57f6423f1055f3d3f7b4faa1abd2c0814e48 /gtk/sctp_stat.c
parentce829a0f94c54c230aa5592929c39aa765676553 (diff)
Rework code slightly to prevent a GCC 'breaking strict-aliasing rules' warning
svn path=/trunk/; revision=29537
Diffstat (limited to 'gtk/sctp_stat.c')
-rw-r--r--gtk/sctp_stat.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/sctp_stat.c b/gtk/sctp_stat.c
index dd7ea9b80c..bb914d724f 100644
--- a/gtk/sctp_stat.c
+++ b/gtk/sctp_stat.c
@@ -300,14 +300,21 @@ static sctp_assoc_info_t *calc_checksum(struct _sctp_info *check_data, sctp_asso
}
+/* XXX: Some versions of gcc warn about "breaking strict aliasing rules"
+ for 'a' in the following (given the way this function is called).
+ As a workaround we'll define the function parameters to match
+ how this function is actually called. */
+/*******
static gint sctp_assoc_vtag_cmp(gconstpointer aa, gconstpointer bb)
{
-
const struct _sctp_assoc_info* a = aa;
const struct _sctp_assoc_info* b = bb;
-
if (a == b)
return(FORWARD_STREAM);
+********/
+
+static gint sctp_assoc_vtag_cmp(const sctp_tmp_info_t *a, const sctp_assoc_info_t *b)
+{
if (a == NULL || b == NULL)
return(ASSOC_NOT_FOUND);