From ef24e09f5d529559bf9e73f70b8434da1c951e80 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Sat, 26 Oct 2013 21:04:53 +0000 Subject: [PATCH] From robionekenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9328 : Suppress some VS2013 warnings when compiling gtk ui svn path=/trunk/; revision=52880 --- ui/gtk/rlc_lte_graph.c | 8 ++++---- ui/gtk/sctp_graph_dlg.c | 6 ++++-- ui/gtk/tcp_graph.c | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index 1b48c526b5..fa66ac26a8 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -343,7 +343,8 @@ static void graph_get_bounds(struct graph *); static void graph_read_config(struct graph *); static void rlc_lte_make_elmtlist(struct graph *); -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2013, rint already defined in math.h. No need to redefine */ static int rint(double ); /* compiler template for Windows */ #endif @@ -2991,8 +2992,8 @@ static void rlc_lte_make_elmtlist(struct graph *g) g->elists->next->elements = elements1; } - -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2013, rint already defined in math.h. N o need to redefine */ /* replacement of Unix rint() for Windows */ static int rint(double x) { @@ -3007,4 +3008,3 @@ static int rint(double x) return i; } #endif - diff --git a/ui/gtk/sctp_graph_dlg.c b/ui/gtk/sctp_graph_dlg.c index c3597067bf..e8004c34f6 100644 --- a/ui/gtk/sctp_graph_dlg.c +++ b/ui/gtk/sctp_graph_dlg.c @@ -133,7 +133,8 @@ static guint32 max_tsn=0, min_tsn=0; static void sctp_graph_set_title(struct sctp_udata *u_data); static void create_draw_area(GtkWidget *box, struct sctp_udata *u_data); static GtkWidget *zoomout_bt; -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2013, rint already defined in math.h. No need to redefine */ static int rint (double ); /* compiler template for Windows */ #endif @@ -1857,7 +1858,8 @@ create_graph(guint16 dir, struct sctp_analyse* userdata) } } -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2013, rint already defined in math.h. No need to redefine */ /* replacement of Unix rint() for Windows */ static int rint (double x) diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 06e1656f8d..427542836f 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -460,7 +460,8 @@ static void rtt_toggle_seq_origin(struct gtk_graph * ); static void wscale_initialize(struct gtk_graph *); static void wscale_read_config(struct gtk_graph *); static void wscale_make_elmtlist(struct gtk_graph *); -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2013, rint already defined in math.h. No need to redefine */ static int rint(double ); /* compiler template for Windows */ #endif @@ -4478,8 +4479,8 @@ static void wscale_make_elmtlist(struct gtk_graph *g) g->elists->elements = elements; } - -#if defined(_WIN32) && !defined(__MINGW32__) +#if defined(_WIN32) && !defined(__MINGW32__) && (_MSC_VER < 1800) +/* Starting VS2103, rint already defined in math.h. No need to redefine */ /* replacement of Unix rint() for Windows */ static int rint(double x) {