Remove use of spice_debug(NULL)

This is causing issues with potential improvements to the logging
system, and I've always found this usage a bit odd anyway.
Using spice_debug(""); was not possible as this triggers
-Wformat-zero-length warnings from our use of -Wall.

Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Christophe Fergeau 2017-06-15 17:24:32 +02:00 committed by Frediano Ziglio
parent abc1df0b6c
commit 1569d429b7
9 changed files with 27 additions and 27 deletions

View File

@ -862,7 +862,7 @@ void red_char_device_migrate_data_marshall_empty(SpiceMarshaller *m)
{
SpiceMigrateDataCharDevice *mig_data;
spice_debug(NULL);
spice_debug("trace");
mig_data = (SpiceMigrateDataCharDevice *)spice_marshaller_reserve_space(m,
sizeof(*mig_data));
memset(mig_data, 0, sizeof(*mig_data));

View File

@ -1278,7 +1278,7 @@ static bool restore_surfaces_lossless(DisplayChannelClient *dcc,
{
uint32_t i;
spice_debug(NULL);
spice_debug("trace");
for (i = 0; i < mig_surfaces->num_surfaces; i++) {
uint32_t surface_id = mig_surfaces->surfaces[i].id;
@ -1293,7 +1293,7 @@ static bool restore_surfaces_lossy(DisplayChannelClient *dcc,
{
uint32_t i;
spice_debug(NULL);
spice_debug("trace");
for (i = 0; i < mig_surfaces->num_surfaces; i++) {
uint32_t surface_id = mig_surfaces->surfaces[i].id;
SpiceMigrateDataRect *mig_lossy_rect;

View File

@ -1441,7 +1441,7 @@ bool display_channel_wait_for_migrate_data(DisplayChannel *display)
return FALSE;
}
spice_debug(NULL);
spice_debug("trace");
spice_warn_if_fail(g_list_length(clients) == 1);
rcc = g_list_nth_data(clients, 0);
@ -2071,7 +2071,7 @@ void display_channel_destroy_surfaces(DisplayChannel *display)
{
int i;
spice_debug(NULL);
spice_debug("trace");
//to handle better
for (i = 0; i < NUM_SURFACES; ++i) {
if (display->priv->surfaces[i].context.canvas) {
@ -2180,7 +2180,7 @@ static void on_disconnect(RedChannelClient *rcc)
DisplayChannel *display;
DisplayChannelClient *dcc;
spice_debug(NULL);
spice_debug("trace");
spice_return_if_fail(rcc != NULL);
dcc = DISPLAY_CHANNEL_CLIENT(rcc);

View File

@ -250,7 +250,7 @@ static bool main_channel_handle_message(RedChannelClient *rcc, uint16_t type,
static bool main_channel_handle_migrate_flush_mark(RedChannelClient *rcc)
{
RedChannel *channel = red_channel_client_get_channel(rcc);
spice_debug(NULL);
spice_debug("trace");
main_channel_push_migrate_data_item(MAIN_CHANNEL(channel));
return TRUE;
}

View File

@ -1067,7 +1067,7 @@ static void mjpeg_encoder_handle_negative_client_stream_report(MJpegEncoder *enc
{
MJpegEncoderRateControl *rate_control = &encoder->rate_control;
spice_debug(NULL);
spice_debug("trace");
if ((rate_control->bit_rate_info.change_start_mm_time > report_end_frame_mm_time ||
!rate_control->bit_rate_info.change_start_mm_time) &&

View File

@ -786,7 +786,7 @@ void red_channel_client_start_connectivity_monitoring(RedChannelClient *rcc, uin
if (!red_channel_client_is_connected(rcc)) {
return;
}
spice_debug(NULL);
spice_debug("trace");
spice_assert(timeout_ms > 0);
/*
* If latency_monitor is not active, we activate it in order to enable
@ -1742,7 +1742,7 @@ bool red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc,
uint64_t end_time;
gboolean item_in_pipe;
spice_debug(NULL);
spice_debug("trace");
if (timeout != -1) {
end_time = spice_get_monotonic_time_ns() + timeout;

View File

@ -505,7 +505,7 @@ static void dev_create_primary_surface(RedWorker *worker, uint32_t surface_id,
uint8_t *line_0;
int error;
spice_debug(NULL);
spice_debug("trace");
spice_warn_if_fail(surface_id == 0);
spice_warn_if_fail(surface.height != 0);
@ -1022,7 +1022,7 @@ static void worker_handle_dispatcher_async_done(void *opaque,
RedWorker *worker = opaque;
RedWorkerMessageAsync *msg_async = payload;
spice_debug(NULL);
spice_debug("trace");
red_qxl_async_complete(worker->qxl, msg_async->cmd);
}

View File

@ -501,7 +501,7 @@ void reds_client_disconnect(RedsState *reds, RedClient *client)
return;
}
spice_debug(NULL);
spice_debug("trace");
/* disconnecting is set to prevent recursion because of the following:
* main_channel_client_on_disconnect->
* reds_client_disconnect->red_client_destroy->main_channel...
@ -577,7 +577,7 @@ static void reds_disconnect(RedsState *reds)
GListIter iter;
RedClient *client;
spice_debug(NULL);
spice_debug("trace");
GLIST_FOREACH(reds->clients, iter, RedClient, client) {
reds_client_disconnect(reds, client);
}
@ -1627,7 +1627,7 @@ static void reds_mig_target_client_add(RedsState *reds, RedClient *client)
RedsMigTargetClient *mig_client;
g_return_if_fail(reds);
spice_debug(NULL);
spice_debug("trace");
mig_client = spice_new0(RedsMigTargetClient, 1);
mig_client->client = client;
mig_client->reds = reds;
@ -1737,7 +1737,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
int mig_target = FALSE;
RedChannelCapabilities caps;
spice_debug(NULL);
spice_debug("trace");
spice_assert(reds->main_channel);
link_mess = link->link_mess;
@ -1908,7 +1908,7 @@ int reds_on_migrate_dst_set_seamless(RedsState *reds, MainChannelClient *mcc, ui
void reds_on_client_seamless_migrate_complete(RedsState *reds, RedClient *client)
{
spice_debug(NULL);
spice_debug("trace");
if (!reds_find_client(reds, client)) {
spice_debug("client no longer exists");
return;
@ -2624,7 +2624,7 @@ static void reds_send_mm_time(RedsState *reds)
if (!reds_main_channel_connected(reds)) {
return;
}
spice_debug(NULL);
spice_debug("trace");
main_channel_push_multi_media_time(reds->main_channel,
reds_get_mm_time() - reds->mm_time_latency);
}
@ -2936,7 +2936,7 @@ static void reds_mig_release(RedServerConfig *config)
static void reds_mig_started(RedsState *reds)
{
spice_debug(NULL);
spice_debug("trace");
spice_assert(reds->config->mig_spice);
reds->mig_inprogress = TRUE;
@ -2987,7 +2987,7 @@ static void reds_migrate_channels_seamless(RedsState *reds)
static void reds_mig_finished(RedsState *reds, int completed)
{
spice_debug(NULL);
spice_debug("trace");
reds->mig_inprogress = TRUE;
@ -3018,7 +3018,7 @@ static void reds_mig_switch(RedsState *reds)
static void migrate_timeout(void *opaque)
{
RedsState *reds = opaque;
spice_debug(NULL);
spice_debug("trace");
spice_assert(reds->mig_wait_connect || reds->mig_wait_disconnect);
if (reds->mig_wait_connect) {
/* we will fall back to the switch host scheme when migration completes */
@ -4100,7 +4100,7 @@ SPICE_GNUC_VISIBLE int spice_server_migrate_connect(SpiceServer *reds, const cha
SpiceMigrateInterface *sif;
int try_seamless;
spice_debug(NULL);
spice_debug("trace");
spice_assert(reds->migration_interface);
if (reds->expect_migrate) {
@ -4147,7 +4147,7 @@ SPICE_GNUC_VISIBLE int spice_server_migrate_info(SpiceServer *reds, const char*
int port, int secure_port,
const char* cert_subject)
{
spice_debug(NULL);
spice_debug("trace");
spice_assert(!reds->migration_interface);
if (!reds_set_migration_dest_info(reds, dest, port, secure_port, cert_subject)) {
@ -4158,7 +4158,7 @@ SPICE_GNUC_VISIBLE int spice_server_migrate_info(SpiceServer *reds, const char*
SPICE_GNUC_VISIBLE int spice_server_migrate_start(SpiceServer *reds)
{
spice_debug(NULL);
spice_debug("trace");
if (!reds->config->mig_spice) {
return -1;
}
@ -4170,7 +4170,7 @@ SPICE_GNUC_VISIBLE int spice_server_migrate_end(SpiceServer *reds, int completed
SpiceMigrateInterface *sif;
int ret = 0;
spice_debug(NULL);
spice_debug("trace");
spice_assert(reds->migration_interface);
@ -4199,7 +4199,7 @@ complete:
/* interface for switch-host migration */
SPICE_GNUC_VISIBLE int spice_server_migrate_switch(SpiceServer *reds)
{
spice_debug(NULL);
spice_debug("trace");
if (reds->clients == NULL) {
return 0;
}

View File

@ -914,7 +914,7 @@ void stream_detach_and_stop(DisplayChannel *display)
{
RingItem *stream_item;
spice_debug(NULL);
spice_debug("trace");
while ((stream_item = ring_get_head(&display->priv->streams))) {
Stream *stream = SPICE_CONTAINEROF(stream_item, Stream, link);