aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/sctp_graph_dlg.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-15 10:52:23 +0100
committerAnders Broman <a.broman58@gmail.com>2014-03-15 11:40:20 +0000
commit35648dec43c05f4b3a2845d9957106852d2c8f28 (patch)
treeca0193d736cc33218bed0e52dc1a887d27df8395 /ui/gtk/sctp_graph_dlg.c
parent0d2dd005647d173959fdd1794ff04840eb5e8cd4 (diff)
Fix -Wabsolute-value in GTK SCTP Graph (Found by Clang 3.5)
sctp_graph_dlg.c:1562:18: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] sctp_graph_dlg.c:1562:18: note: remove the call to 'abs' since unsigned values cannot be negative sctp_graph_dlg.c:1574:18: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value] sctp_graph_dlg.c:1574:18: note: remove the call to 'abs' since unsigned values cannot be negative Change-Id: If3cdce123256543a95fe0b596eee962e1d93d118 Reviewed-on: https://code.wireshark.org/review/674 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'ui/gtk/sctp_graph_dlg.c')
-rw-r--r--ui/gtk/sctp_graph_dlg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gtk/sctp_graph_dlg.c b/ui/gtk/sctp_graph_dlg.c
index 471314c254..e7278668ed 100644
--- a/ui/gtk/sctp_graph_dlg.c
+++ b/ui/gtk/sctp_graph_dlg.c
@@ -1559,7 +1559,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
for (i=0; i<s_size; i++)
{
sack = (struct tsn_sort*)(g_ptr_array_index(sacklist, i));
- if ((guint32)abs(sack->tsnumber - y_value)<y_tolerance)
+ if ((guint32)(sack->tsnumber - y_value)<y_tolerance)
{
s_diff = fabs((sack->secs+sack->usecs/1000000.0)- x_value);
if (s_diff < x_tolerance)
@@ -1571,7 +1571,7 @@ on_button_release_event (GtkWidget *widget _U_, GdkEventButton *event, gpointer
for (i=0; i<t_size; i++)
{
tsn = (struct tsn_sort*)(g_ptr_array_index(tsnlist, i));
- if ((guint32)abs(tsn->tsnumber - y_value)<y_tolerance)
+ if ((guint32)(tsn->tsnumber - y_value)<y_tolerance)
{
t_diff = fabs((tsn->secs+tsn->usecs/1000000.0)- x_value);
if (sack_found && s_diff < t_diff)