[gst-debugger] fix compiler warnings
- From: Marcin Kolny <mkolny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gst-debugger] fix compiler warnings
- Date: Sun, 1 Oct 2017 17:02:52 +0000 (UTC)
commit dd2209924d727c83801a38f1f9777cee1494952b
Author: Marcin Kolny <marcin kolny gmail com>
Date: Sun Oct 1 17:40:27 2017 +0100
fix compiler warnings
src/debugserver/gstdebugserver.c | 11 ++++++++---
src/debugserver/gstdebugserverbuffer.c | 4 ++--
src/debugserver/gstdebugservermessage.c | 2 +-
src/debugserver/gstdebugserverqe.c | 8 ++++----
src/debugserver/gstdebugservertcp.c | 7 +++----
src/debugserver/gstdebugservertopology.c | 4 ----
src/debugserver/gstdebugservertypes.c | 7 ++++---
src/gst-debugger/controller/controller.cpp | 3 +++
src/gst-debugger/modules/base_main_module.cpp | 4 ++--
src/gst-debugger/pipeline-drawer/graph_module.cpp | 1 -
10 files changed, 27 insertions(+), 24 deletions(-)
---
diff --git a/src/debugserver/gstdebugserver.c b/src/debugserver/gstdebugserver.c
index 94a3134..fe56e59 100644
--- a/src/debugserver/gstdebugserver.c
+++ b/src/debugserver/gstdebugserver.c
@@ -26,6 +26,8 @@
* A tracing module that communicates with user via tcp/ip.
*/
+#define GST_USE_UNSTABLE_API
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -223,7 +225,7 @@ gst_debugserver_tracer_send_property (GstDebugserverTcp * tcp_server, TcpClient
serialized_data = g_value_serialize (&gvalue, &out_gtype, &out_internal_type);
- value.data.data = serialized_data;
+ value.data.data = (guchar*) serialized_data;
value.data.len = serialized_data == NULL ? 0 : strlen (serialized_data);
value.gtype = out_gtype;
value.type_name = (gchar*) g_type_name (spec->value_type);
@@ -393,7 +395,7 @@ static void gst_debugserver_process_property_request (GstDebugserverTracer * sel
GstDebugger__PropertyRequest * request)
{
GstElement * element = gst_utils_get_element_from_path (GST_ELEMENT_CAST (self->pipeline),
request->object);
- gint n_properties, i;
+ guint n_properties, i;
GParamSpec **spec;
if (element == NULL) {
@@ -448,7 +450,7 @@ static void gst_debugserver_command_handler (GstDebugger__Command * command,
GValue val = G_VALUE_INIT;
GstElement *element = gst_utils_get_element_from_path (GST_ELEMENT_CAST (self->pipeline),
command->property_set->object);
g_value_deserialize (&val, command->property_set->value->gtype,
command->property_set->value->internal_type,
- command->property_set->value->data.data, command->property_set->value->data.len);
+ (gchar*) command->property_set->value->data.data, command->property_set->value->data.len);
g_object_set_property (G_OBJECT (element), command->property_set->name, &val);
g_value_unset (&val);
break;
@@ -476,6 +478,9 @@ static void gst_debugserver_command_handler (GstDebugger__Command * command,
g_free (allowed_caps_str);
g_free (current_caps_str);
}
+ case GST_DEBUGGER__COMMAND__COMMAND_TYPE__NOT_SET:
+ // TODO: error
+ break;
}
}
diff --git a/src/debugserver/gstdebugserverbuffer.c b/src/debugserver/gstdebugserverbuffer.c
index a557a46..eeee4b9 100644
--- a/src/debugserver/gstdebugserverbuffer.c
+++ b/src/debugserver/gstdebugserverbuffer.c
@@ -117,7 +117,7 @@ void gst_debugserver_buffer_send_buffer (GstDebugserverBuffer * buffer,
gchar *pad_path = gst_utils_get_object_path (GST_OBJECT_CAST (pad));
GSList *list = NULL;
BufferHook hook = { FALSE, pad, pad_path };
- gchar *buff_data = NULL;
+ guchar *buff_data = NULL;
buffer_info.dts = GST_BUFFER_DTS (gst_buffer);
buffer_info.pts = GST_BUFFER_PTS (gst_buffer);
@@ -127,7 +127,7 @@ void gst_debugserver_buffer_send_buffer (GstDebugserverBuffer * buffer,
buffer_info.pad = pad_path;
buffer_info.size = gst_buffer_get_size (gst_buffer);
- buff_data = (gchar*) g_malloc (sizeof (gchar) * buffer_info.size);
+ buff_data = (guchar*) g_malloc (sizeof (guchar) * buffer_info.size);
gst_buffer_extract (gst_buffer, 0, buff_data, buffer_info.size);
buffer_info.data.data = buff_data;
diff --git a/src/debugserver/gstdebugservermessage.c b/src/debugserver/gstdebugservermessage.c
index 429dde4..95024df 100644
--- a/src/debugserver/gstdebugservermessage.c
+++ b/src/debugserver/gstdebugservermessage.c
@@ -91,7 +91,7 @@ void gst_debugserver_message_send_message (GstDebugserverMessage * msg, GstDebug
msg_info.seqnum = gst_msg->seqnum;
msg_info.timestamp = gst_msg->timestamp;
msg_info.type = gst_msg->type;
- msg_info.structure_data.data = structure_data;
+ msg_info.structure_data.data = (guchar*) structure_data;
msg_info.structure_data.len = structure_data == NULL ? 0 : strlen (structure_data);
gst_data.info_type_case = GST_DEBUGGER__GSTREAMER_DATA__INFO_TYPE_MESSAGE_INFO;
diff --git a/src/debugserver/gstdebugserverqe.c b/src/debugserver/gstdebugserverqe.c
index cc1829c..39a694d 100644
--- a/src/debugserver/gstdebugserverqe.c
+++ b/src/debugserver/gstdebugserverqe.c
@@ -145,8 +145,8 @@ void gst_debugserver_qe_send_qe (GstDebugserverQE * qe, GstDebugserverTcp * tcp_
event_info.structure_data.data = NULL;
event_info.structure_data.len = 0;
} else {
- event_info.structure_data.data = gst_structure_to_string (structure);
- event_info.structure_data.len = strlen (event_info.structure_data.data);
+ event_info.structure_data.data = (guchar*) gst_structure_to_string (structure);
+ event_info.structure_data.len = strlen ((gchar*) event_info.structure_data.data);
}
event_info.pad = pad_path;
gst_data.event_info = &event_info;
@@ -160,8 +160,8 @@ void gst_debugserver_qe_send_qe (GstDebugserverQE * qe, GstDebugserverTcp * tcp_
query_info.structure_data.data = NULL;
query_info.structure_data.len = 0;
} else {
- query_info.structure_data.data = gst_structure_to_string (structure);
- query_info.structure_data.len = strlen (query_info.structure_data.data);
+ query_info.structure_data.data = (guchar*) gst_structure_to_string (structure);
+ query_info.structure_data.len = strlen ((gchar*) query_info.structure_data.data);
}
gst_data.query_info = &query_info;
gst_data.info_type_case = GST_DEBUGGER__GSTREAMER_DATA__INFO_TYPE_QUERY_INFO;
diff --git a/src/debugserver/gstdebugservertcp.c b/src/debugserver/gstdebugservertcp.c
index ef7599c..ac7ffad 100644
--- a/src/debugserver/gstdebugservertcp.c
+++ b/src/debugserver/gstdebugservertcp.c
@@ -213,10 +213,9 @@ gst_debugserver_tcp_send_packet (GstDebugserverTcp * tcp, TcpClient * client,
GstDebugger__GStreamerData * gst_data)
{
GError *err = NULL;
- gchar size_buffer[4];
GOutputStream *ostream;
- gchar buff[1024];
- gchar *m_buff = buff;
+ guchar buff[1024];
+ guchar *m_buff = buff;
gint size;
if (client == NULL) {
@@ -243,7 +242,7 @@ gst_debugserver_tcp_send_packet (GstDebugserverTcp * tcp, TcpClient * client,
}
if (size > 1024) {
- m_buff = (char*) g_malloc (size * sizeof (char));
+ m_buff = (guchar*) g_malloc (size * sizeof (guchar));
}
gst_debugger__gstreamer_data__pack (gst_data, m_buff);
diff --git a/src/debugserver/gstdebugservertopology.c b/src/debugserver/gstdebugservertopology.c
index be7d51b..59c0c0a 100644
--- a/src/debugserver/gstdebugservertopology.c
+++ b/src/debugserver/gstdebugservertopology.c
@@ -43,8 +43,6 @@ send_object (GstObject *object, GstDebugger__Action action, GstDebugserverTcp *
{
GstDebugger__GStreamerData info = GST_DEBUGGER__GSTREAMER_DATA__INIT;
GstDebugger__TopologyInfo topology = GST_DEBUGGER__TOPOLOGY_INFO__INIT;
- gint size;
- gchar buffer[1024];
GstDebugger__TopologyElement element_tp = GST_DEBUGGER__TOPOLOGY_ELEMENT__INIT;
GstDebugger__TopologyPad pad_tp = GST_DEBUGGER__TOPOLOGY_PAD__INIT;
GstDebugger__PadTemplate template = GST_DEBUGGER__PAD_TEMPLATE__INIT;
@@ -89,8 +87,6 @@ send_link (GstPad *src_pad, GstPad *sink_pad, GstDebugger__Action action, GstDeb
{
GstDebugger__GStreamerData info = GST_DEBUGGER__GSTREAMER_DATA__INIT;
GstDebugger__TopologyInfo topology = GST_DEBUGGER__TOPOLOGY_INFO__INIT;
- gint size;
- gchar buffer[1024];
GstDebugger__TopologyLink link_tp = GST_DEBUGGER__TOPOLOGY_LINK__INIT;
if (!gst_utils_check_pad_has_element_parent (src_pad) || !gst_utils_check_pad_has_element_parent
(sink_pad)) {
diff --git a/src/debugserver/gstdebugservertypes.c b/src/debugserver/gstdebugservertypes.c
index e20377a..ee3a767 100644
--- a/src/debugserver/gstdebugservertypes.c
+++ b/src/debugserver/gstdebugservertypes.c
@@ -160,8 +160,7 @@ static void gst_debugserver_types_send_klass (GstDebugserverTcp *tcp_server, Tcp
GstDebugger__PropertyInfo **properties_info = NULL;
GParamSpec **specs;
GValue gvalue = G_VALUE_INIT;
- gint n_specs, i;
- GstElement *element = NULL;
+ guint n_specs, i;
GType out_gtype;
InternalGType out_internal_type;
GstDebugger__Value *value = NULL;
@@ -191,7 +190,7 @@ static void gst_debugserver_types_send_klass (GstDebugserverTcp *tcp_server, Tcp
gst_debugger__value__init (value);
value->type_name = (gchar*) g_type_name (specs[i]->value_type);
value->data.data = (uint8_t*) g_value_serialize (&gvalue, &out_gtype, &out_internal_type);
- value->data.len = value->data.data == NULL ? 0 : strlen (value->data.data);
+ value->data.len = value->data.data == NULL ? 0 : strlen ((gchar*) value->data.data);
value->gtype = out_gtype;
if (out_gtype == specs[i]->value_type) {
@@ -231,5 +230,7 @@ void gst_debugserver_types_send_type (GstDebugserverTcp *tcp_server, TcpClient *
case GST_DEBUGGER__TYPE_DESCRIPTION_REQUEST__TYPE__KLASS:
gst_debugserver_types_send_klass (tcp_server, client, request->name);
break;
+ default:
+ break;
}
}
diff --git a/src/gst-debugger/controller/controller.cpp b/src/gst-debugger/controller/controller.cpp
index 7250496..64ef48d 100644
--- a/src/gst-debugger/controller/controller.cpp
+++ b/src/gst-debugger/controller/controller.cpp
@@ -107,6 +107,9 @@ void Controller::process_frame(const GstDebugger::GStreamerData &data)
case GstDebugger::GStreamerData::kLogInfo:
on_log_received(data.log_info());
break;
+ case GstDebugger::GStreamerData::INFO_TYPE_NOT_SET:
+ // TODO: error
+ break;
}
}
diff --git a/src/gst-debugger/modules/base_main_module.cpp b/src/gst-debugger/modules/base_main_module.cpp
index a8e8121..50c288e 100644
--- a/src/gst-debugger/modules/base_main_module.cpp
+++ b/src/gst-debugger/modules/base_main_module.cpp
@@ -17,9 +17,9 @@ inline void free_data(GstDebugger::GStreamerData* data) { delete data; }
BaseMainModule::BaseMainModule(GstDebugger::GStreamerData::InfoTypeCase info_type, const std::string
&module_name)
: supported_info_type(info_type),
+ module_name(module_name),
model(Gtk::ListStore::create(columns)),
- details_model(Gtk::ListStore::create(detail_columns)),
- module_name(module_name)
+ details_model(Gtk::ListStore::create(detail_columns))
{
create_dispatcher("new-data", sigc::mem_fun(*this, &BaseMainModule::data_received_),
(GDestroyNotify)free_data);
diff --git a/src/gst-debugger/pipeline-drawer/graph_module.cpp
b/src/gst-debugger/pipeline-drawer/graph_module.cpp
index dde13ba..433663c 100644
--- a/src/gst-debugger/pipeline-drawer/graph_module.cpp
+++ b/src/gst-debugger/pipeline-drawer/graph_module.cpp
@@ -81,7 +81,6 @@ bool GraphModule::graphDrawingArea_button_press_event_cb(GdkEventButton *event)
pointf pointer;
Agraphinfo_t *g_info;
Agnodeinfo_t *n_info;
- Agedgeinfo_t *e_info;
job = (GVJ_t *)g_object_get_data(G_OBJECT(graph_drawing_area->gobj()),"job");
pointer.x = event->x;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]