aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-10-04 11:52:26 +0200
committerMichael Mann <mmann78@netscape.net>2015-10-05 03:21:46 +0000
commit5b1d142f52ab8f89f558ab18788637d3eefdd2bb (patch)
treeda98a23d9b02473941060f205a0b67e7eff863ad
parent908cdc68a1a4c236feb9f6c0604afe74e1ed0684 (diff)
Fix warnings introduced by "Qt: Initial RTP playback"
Change-Id: I28ae077be535f32ef81ac370d6782033f219017d Reviewed-on: https://code.wireshark.org/review/10777 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--codecs/speex/arch.h2
-rw-r--r--codecs/speex/resample.c8
-rw-r--r--ui/qt/rtp_player_dialog.cpp2
-rw-r--r--ui/qt/rtp_player_dialog.h2
-rw-r--r--ui/tap-sequence-analysis.h7
-rw-r--r--ui/voip_calls.h7
6 files changed, 11 insertions, 17 deletions
diff --git a/codecs/speex/arch.h b/codecs/speex/arch.h
index e160663ee1..eaad6b9260 100644
--- a/codecs/speex/arch.h
+++ b/codecs/speex/arch.h
@@ -70,7 +70,9 @@
#include "speex/speexdsp_types.h"
#endif
+#ifndef ABS /* already defined by glib.h */
#define ABS(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute integer value. */
+#endif
#define ABS16(x) ((x) < 0 ? (-(x)) : (x)) /**< Absolute 16-bit value. */
#define MIN16(a,b) ((a) < (b) ? (a) : (b)) /**< Maximum 16-bit value. */
#define MAX16(a,b) ((a) > (b) ? (a) : (b)) /**< Maximum 16-bit value. */
diff --git a/codecs/speex/resample.c b/codecs/speex/resample.c
index 1faf88b0bd..0a903792f0 100644
--- a/codecs/speex/resample.c
+++ b/codecs/speex/resample.c
@@ -63,10 +63,10 @@
#define FLOATING_POINT 1
#ifdef OUTSIDE_SPEEX
-#include <stdlib.h>
-static void *speex_alloc (size_t size) {return calloc(size,1);}
-static void *speex_realloc (void *ptr, size_t size) {return realloc(ptr, size);}
-static void speex_free (void *ptr) {free(ptr);}
+#include <glib.h>
+static void *speex_alloc (size_t size) {return g_malloc0(size);}
+static void *speex_realloc (void *ptr, size_t size) {return g_realloc(ptr, size);}
+static void speex_free (void *ptr) {g_free(ptr);}
#include "speex_resampler.h"
#include "arch.h"
#else /* OUTSIDE_SPEEX */
diff --git a/ui/qt/rtp_player_dialog.cpp b/ui/qt/rtp_player_dialog.cpp
index d3cdd84864..d072b10808 100644
--- a/ui/qt/rtp_player_dialog.cpp
+++ b/ui/qt/rtp_player_dialog.cpp
@@ -93,8 +93,10 @@ enum {
graph_data_col_ = src_port_col_ // QCPGraph
};
+#ifdef QT_MULTIMEDIA_LIB
static const double wf_graph_normal_width_ = 0.5;
static const double wf_graph_selected_width_ = 2.0;
+#endif
RtpPlayerDialog::RtpPlayerDialog(QWidget &parent, CaptureFile &cf) :
WiresharkDialog(parent, cf)
diff --git a/ui/qt/rtp_player_dialog.h b/ui/qt/rtp_player_dialog.h
index a52544ab1c..61a916e9b0 100644
--- a/ui/qt/rtp_player_dialog.h
+++ b/ui/qt/rtp_player_dialog.h
@@ -114,7 +114,7 @@ private:
const QString getHoveredTime();
int getHoveredPacket();
-#else // QT_MULTIMEDIA_LIB
+#else // QT_MULTIMEDIA_LIB
private:
Ui::RtpPlayerDialog *ui;
#endif // QT_MULTIMEDIA_LIB
diff --git a/ui/tap-sequence-analysis.h b/ui/tap-sequence-analysis.h
index f3b900464e..daabeca205 100644
--- a/ui/tap-sequence-analysis.h
+++ b/ui/tap-sequence-analysis.h
@@ -79,14 +79,9 @@ typedef struct _seq_analysis_info {
} seq_analysis_info_t;
#if 0
-#ifdef _MSC_VER
-#define _ws_func_ __FUNCTION__
-#else
-#define _ws_func_ __func__
-#endif
#define SEQ_ANALYSIS_DEBUG(...) { \
char *SEQ_ANALYSIS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
- g_warning("sequence analysis: %s:%d %s", _ws_func_, __LINE__, SEQ_ANALYSIS_DEBUG_MSG); \
+ g_warning("sequence analysis: %s:%d %s", G_STRFUNC, __LINE__, SEQ_ANALYSIS_DEBUG_MSG); \
g_free(SEQ_ANALYSIS_DEBUG_MSG); \
}
#else
diff --git a/ui/voip_calls.h b/ui/voip_calls.h
index 170042a454..dbab87e2b5 100644
--- a/ui/voip_calls.h
+++ b/ui/voip_calls.h
@@ -228,14 +228,9 @@ typedef struct _voip_calls_tapinfo {
} voip_calls_tapinfo_t;
#if 0
-#ifdef _MSC_VER
-#define _ws_func_ __FUNCTION__
-#else
-#define _ws_func_ __func__
-#endif
#define VOIP_CALLS_DEBUG(...) { \
char *VOIP_CALLS_DEBUG_MSG = g_strdup_printf(__VA_ARGS__); \
- g_warning("voip_calls: %s:%d %s", _ws_func_, __LINE__, VOIP_CALLS_DEBUG_MSG); \
+ g_warning("voip_calls: %s:%d %s", G_STRFUNC, __LINE__, VOIP_CALLS_DEBUG_MSG); \
g_free(VOIP_CALLS_DEBUG_MSG); \
}
#else