As this is included by default nowadays --- src/channel-base.c | 6 +++--- src/channel-cursor.c | 10 +++++----- src/channel-display.c | 34 +++++++++++++++++----------------- src/channel-inputs.c | 2 +- src/channel-main.c | 5 ++--- src/channel-playback.c | 12 ++++++------ src/channel-record.c | 2 +- src/decode-glz.c | 6 ++---- src/spice-channel.c | 18 +++++++++--------- src/spice-gstaudio.c | 4 ++-- src/spice-gtk-session.c | 2 +- src/spice-pulse.c | 34 +++++++++++++++++----------------- src/spice-session.c | 6 +++--- src/spice-util.c | 4 ++-- src/spice-widget.c | 32 ++++++++++++++++---------------- 15 files changed, 87 insertions(+), 90 deletions(-) diff --git a/src/channel-base.c b/src/channel-base.c index 67dc311..7cf2646 100644 --- a/src/channel-base.c +++ b/src/channel-base.c @@ -77,7 +77,7 @@ void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in) message_str = (char*)notify->message; } - CHANNEL_DEBUG(channel, "%s -- %s%s #%u%s%.*s", __FUNCTION__, + CHANNEL_DEBUG(channel, "%s%s #%u%s%.*s", severity, visibility, notify->what, message_str ? ": " : "", notify->message_len, message_str ? message_str : ""); @@ -89,7 +89,7 @@ void spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in) { SpiceMsgDisconnect *disconnect = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: ts: %" PRIu64", reason: %u", __FUNCTION__, + CHANNEL_DEBUG(channel, "ts: %" PRIu64", reason: %u", disconnect->time_stamp, disconnect->reason); } @@ -158,7 +158,7 @@ void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgMigrate *mig = spice_msg_in_parsed(in); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s: flags %u", __FUNCTION__, mig->flags); + CHANNEL_DEBUG(channel, "flags %u", mig->flags); if (mig->flags & SPICE_MIGRATE_NEED_FLUSH) { /* if peer version > 1: pushing the mark msg before all other messgages and sending it, * and only it */ diff --git a/src/channel-cursor.c b/src/channel-cursor.c index fff0737..dcecdd4 100644 --- a/src/channel-cursor.c +++ b/src/channel-cursor.c @@ -311,13 +311,13 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) guint8 *rgba; guint8 val; - CHANNEL_DEBUG(channel, "%s: flags %d, size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "flags %d, size %d", scursor->flags, scursor->data_size); if (scursor->flags & SPICE_CURSOR_FLAGS_NONE) return NULL; - CHANNEL_DEBUG(channel, "%s: type %s(%d), %" PRIx64 ", %dx%d", __FUNCTION__, + CHANNEL_DEBUG(channel, "type %s(%d), %" PRIx64 ", %dx%d", cursor_type_to_string(hdr->type), hdr->type, hdr->unique, hdr->width, hdr->height); @@ -381,7 +381,7 @@ static display_cursor *set_cursor(SpiceChannel *channel, SpiceCursor *scursor) break; default: - spice_warning("%s: unimplemented cursor type %d", __FUNCTION__, + spice_warning("unimplemented cursor type %d", hdr->type); cursor->default_cursor = TRUE; goto cache_add; @@ -438,7 +438,7 @@ static void cursor_handle_reset(SpiceChannel *channel, SpiceMsgIn *in) { SpiceCursorChannelPrivate *c = SPICE_CURSOR_CHANNEL(channel)->priv; - CHANNEL_DEBUG(channel, "%s, init_done: %d", __FUNCTION__, c->init_done); + CHANNEL_DEBUG(channel, "init_done: %d", c->init_done); cache_clear(c->cursors); g_coroutine_signal_emit(channel, signals[SPICE_CURSOR_RESET], 0); @@ -496,7 +496,7 @@ static void cursor_handle_trail(SpiceChannel *channel, SpiceMsgIn *in) g_return_if_fail(c->init_done == TRUE); - spice_warning("%s: TODO", __FUNCTION__); + spice_warning("TODO"); } /* coroutine context */ diff --git a/src/channel-display.c b/src/channel-display.c index 1a71861..d9127a5 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -928,7 +928,7 @@ static void spice_display_channel_up(SpiceChannel *channel) "glz-window-size", &glz_window_size, "preferred-compression", &preferred_compression, NULL); - CHANNEL_DEBUG(channel, "%s: cache_size %d, glz_window_size %d (bytes)", __FUNCTION__, + CHANNEL_DEBUG(channel, "cache_size %d, glz_window_size %d (bytes)", cache_size, glz_window_size); init.pixmap_cache_id = 1; init.glz_dictionary_id = 1; @@ -983,7 +983,7 @@ static void display_handle_mark(SpiceChannel *channel, SpiceMsgIn *in) { SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); g_return_if_fail(c->primary != NULL); #ifdef EXTRA_CHECKS g_warn_if_fail(c->mark == FALSE); @@ -999,7 +999,7 @@ static void display_handle_reset(SpiceChannel *channel, SpiceMsgIn *in) SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; display_surface *surface = c->primary; - CHANNEL_DEBUG(channel, "%s: TODO detach_from_screen", __FUNCTION__); + CHANNEL_DEBUG(channel, "TODO detach_from_screen"); if (surface != NULL) surface->canvas->ops->clear(surface->canvas); @@ -1101,7 +1101,7 @@ static void display_handle_stream_create(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgDisplayStreamCreate *op = spice_msg_in_parsed(in); display_stream *st; - CHANNEL_DEBUG(channel, "%s: id %d", __FUNCTION__, op->id); + CHANNEL_DEBUG(channel, "id %d", op->id); if (op->id >= c->nstreams) { int n = c->nstreams; @@ -1145,7 +1145,7 @@ static gboolean display_stream_schedule(display_stream *st) SpiceStreamDataHeader *op; SpiceMsgIn *in; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (st->timeout || !session) return TRUE; @@ -1163,8 +1163,8 @@ static gboolean display_stream_schedule(display_stream *st) st->timeout = g_timeout_add(d, (GSourceFunc)display_stream_render, st); return TRUE; } else { - spice_debug("%s: rendering too late by %u ms (ts: %u, mmtime: %u), dropping ", - __FUNCTION__, time - op->multi_media_time, + spice_debug("rendering too late by %u ms (ts: %u, mmtime: %u), dropping ", + time - op->multi_media_time, op->multi_media_time, time); in = g_queue_pop_head(st->msgq); spice_msg_in_unref(in); @@ -1369,7 +1369,7 @@ static void display_update_stream_report(SpiceDisplayChannel *channel, uint32_t static void display_stream_reset_rendering_timer(display_stream *st) { - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (st->timeout != 0) { g_source_remove(st->timeout); st->timeout = 0; @@ -1418,7 +1418,7 @@ static void display_session_mm_time_reset_cb(SpiceSession *session, gpointer dat SpiceDisplayChannelPrivate *c = SPICE_DISPLAY_CHANNEL(channel)->priv; guint i; - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); for (i = 0; i < c->nstreams; i++) { display_stream *st; @@ -1426,7 +1426,7 @@ static void display_session_mm_time_reset_cb(SpiceSession *session, gpointer dat if (c->streams[i] == NULL) { continue; } - spice_debug("%s: stream-id %d", __FUNCTION__, i); + spice_debug("stream-id %d", i); st = c->streams[i]; display_stream_reset_rendering_timer(st); } @@ -1440,7 +1440,7 @@ static void display_stream_test_frames_mm_time_reset(display_stream *st, SpiceStreamDataHeader *tail_op, *new_op; SpiceMsgIn *tail_msg; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); g_return_if_fail(new_frame_msg != NULL); tail_msg = g_queue_peek_tail(st->msgq); if (!tail_msg) { @@ -1575,9 +1575,9 @@ static void destroy_stream(SpiceChannel *channel, int id) return; num_out_frames = st->num_input_frames - st->num_drops_on_receive - st->num_drops_on_playback; - CHANNEL_DEBUG(channel, "%s: id=%d #in-frames=%d out/in=%.2f " + CHANNEL_DEBUG(channel, "id=%d #in-frames=%d out/in=%.2f " "#drops-on-receive=%d avg-late-time(ms)=%.2f " - "#drops-on-playback=%d", __FUNCTION__, + "#drops-on-playback=%d", id, st->num_input_frames, num_out_frames / (double)st->num_input_frames, @@ -1585,20 +1585,20 @@ static void destroy_stream(SpiceChannel *channel, int id) st->num_drops_on_receive ? st->arrive_late_time / ((double)st->num_drops_on_receive): 0, st->num_drops_on_playback); if (st->num_drops_seqs) { - CHANNEL_DEBUG(channel, "%s: #drops-sequences=%u ==>", __FUNCTION__, st->num_drops_seqs); + CHANNEL_DEBUG(channel, "#drops-sequences=%u ==>", st->num_drops_seqs); } for (i = 0; i < st->num_drops_seqs; i++) { drops_sequence_stats *stats = &g_array_index(st->drops_seqs_stats_arr, drops_sequence_stats, i); drops_duration_total += stats->duration; - CHANNEL_DEBUG(channel, "%s: \t len=%u start-ms=%u duration-ms=%u", __FUNCTION__, + CHANNEL_DEBUG(channel, "\t len=%u start-ms=%u duration-ms=%u", stats->len, stats->start_mm_time - st->first_frame_mm_time, stats->duration); } if (st->num_drops_seqs) { - CHANNEL_DEBUG(channel, "%s: drops-total-duration=%"G_GUINT64_FORMAT" ==>", __FUNCTION__, drops_duration_total); + CHANNEL_DEBUG(channel, "drops-total-duration=%"G_GUINT64_FORMAT" ==>", drops_duration_total); } g_array_free(st->drops_seqs_stats_arr, TRUE); @@ -1640,7 +1640,7 @@ static void display_handle_stream_destroy(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgDisplayStreamDestroy *op = spice_msg_in_parsed(in); g_return_if_fail(op != NULL); - CHANNEL_DEBUG(channel, "%s: id %d", __FUNCTION__, op->id); + CHANNEL_DEBUG(channel, "id %d", op->id); destroy_stream(channel, op->id); } diff --git a/src/channel-inputs.c b/src/channel-inputs.c index 140282a..5cc6f5f 100644 --- a/src/channel-inputs.c +++ b/src/channel-inputs.c @@ -183,7 +183,7 @@ static SpiceMsgOut* mouse_position(SpiceInputsChannel *channel) if (c->dpy == -1) return NULL; - /* CHANNEL_DEBUG(channel, "%s: +%d+%d", __FUNCTION__, c->x, c->y); */ + /* CHANNEL_DEBUG(channel, "+%d+%d", c->x, c->y); */ position.buttons_state = c->bs; position.x = c->x; position.y = c->y; diff --git a/src/channel-main.c b/src/channel-main.c index a9c05b8..14a6a80 100644 --- a/src/channel-main.c +++ b/src/channel-main.c @@ -2061,8 +2061,7 @@ static void main_agent_handle_msg(SpiceChannel *channel, for (i = 0; i < size * 32; i++) { if (!VD_AGENT_HAS_CAPABILITY(caps->caps, size, i)) continue; - spice_debug("%s: cap: %d (%s)", __FUNCTION__, - i, NAME(agent_caps, i)); + spice_debug("cap: %d (%s)", i, NAME(agent_caps, i)); VD_AGENT_SET_CAPABILITY(c->agent_caps, i); } c->agent_caps_received = true; @@ -2131,7 +2130,7 @@ static void main_agent_handle_msg(SpiceChannel *channel, case VD_AGENT_REPLY: { VDAgentReply *reply = payload; - spice_debug("%s: reply: type %d, %s", __FUNCTION__, reply->type, + spice_debug("reply: type %d, %s", reply->type, reply->error == VD_AGENT_SUCCESS ? "success" : "error"); break; } diff --git a/src/channel-playback.c b/src/channel-playback.c index e7f8278..8331706 100644 --- a/src/channel-playback.c +++ b/src/channel-playback.c @@ -311,7 +311,7 @@ static void playback_handle_data(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgPlaybackPacket *packet = spice_msg_in_parsed(in); #ifdef DEBUG - CHANNEL_DEBUG(channel, "%s: time %u data %p size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "time %u data %p size %d", packet->time, packet->data, packet->data_size); #endif @@ -348,7 +348,7 @@ static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in) SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; SpiceMsgPlaybackMode *mode = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: time %u mode %d data %p size %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "time %u mode %d data %p size %d", mode->time, mode->mode, mode->data, mode->data_size); c->mode = mode->mode; @@ -358,7 +358,7 @@ static void playback_handle_mode(SpiceChannel *channel, SpiceMsgIn *in) case SPICE_AUDIO_DATA_MODE_OPUS: break; default: - spice_warning("%s: unhandled mode", __FUNCTION__); + spice_warning("unhandled mode"); break; } } @@ -369,7 +369,7 @@ static void playback_handle_start(SpiceChannel *channel, SpiceMsgIn *in) SpicePlaybackChannelPrivate *c = SPICE_PLAYBACK_CHANNEL(channel)->priv; SpiceMsgPlaybackStart *start = spice_msg_in_parsed(in); - CHANNEL_DEBUG(channel, "%s: fmt %d channels %d freq %d time %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "fmt %d channels %d freq %d time %d", start->format, start->channels, start->frequency, start->time); c->frame_count = 0; @@ -432,7 +432,7 @@ static void playback_handle_set_latency(SpiceChannel *channel, SpiceMsgIn *in) SpiceMsgPlaybackLatency *msg = spice_msg_in_parsed(in); c->min_latency = msg->latency_ms; - spice_debug("%s: notify latency update %u", __FUNCTION__, c->min_latency); + spice_debug("notify latency update %u", c->min_latency); g_coroutine_object_notify(G_OBJECT(channel), "min-latency"); } @@ -500,6 +500,6 @@ void spice_playback_channel_sync_latency(SpicePlaybackChannel *channel) { g_return_if_fail(SPICE_IS_PLAYBACK_CHANNEL(channel)); g_return_if_fail(channel->priv->is_active); - spice_debug("%s: notify latency update %u", __FUNCTION__, channel->priv->min_latency); + spice_debug("notify latency update %u", channel->priv->min_latency); g_coroutine_object_notify(G_OBJECT(SPICE_CHANNEL(channel)), "min-latency"); } diff --git a/src/channel-record.c b/src/channel-record.c index d465c3d..1e92134 100644 --- a/src/channel-record.c +++ b/src/channel-record.c @@ -410,7 +410,7 @@ static void record_handle_start(SpiceChannel *channel, SpiceMsgIn *in) c->mode = spice_record_desired_mode(channel, start->frequency); - CHANNEL_DEBUG(channel, "%s: fmt %d channels %d freq %d", __FUNCTION__, + CHANNEL_DEBUG(channel, "fmt %d channels %d freq %d", start->format, start->channels, start->frequency); g_return_if_fail(start->format == SPICE_AUDIO_FMT_S16); diff --git a/src/decode-glz.c b/src/decode-glz.c index 49e74cb..85c35f6 100644 --- a/src/decode-glz.c +++ b/src/decode-glz.c @@ -94,8 +94,7 @@ static void glz_decoder_window_resize(SpiceGlzDecoderWindow *w) struct glz_image **new_images; int i, new_slot; - spice_debug("%s: array resize %d -> %d", __FUNCTION__, - w->nimages, w->nimages * 2); + spice_debug("array resize %d -> %d", w->nimages, w->nimages * 2); new_images = g_new0(struct glz_image*, w->nimages * 2); for (i = 0; i < w->nimages; i++) { if (w->images[i] == NULL) { @@ -370,8 +369,7 @@ static void decode_header(GlibGlzDecoder *d) d->image.id = decode_64(d); d->image.win_head_dist = decode_32(d); - spice_debug("%s: %dx%d, id %" PRId64 ", ref %" PRId64, - __FUNCTION__, + spice_debug("%dx%d, id %" PRId64 ", ref %" PRId64, d->image.width, d->image.height, d->image.id, d->image.id - d->image.win_head_dist); } diff --git a/src/spice-channel.c b/src/spice-channel.c index e2a44d1..4a2e30b 100644 --- a/src/spice-channel.c +++ b/src/spice-channel.c @@ -136,7 +136,7 @@ static void spice_channel_constructed(GObject *gobject) snprintf(c->name, sizeof(c->name), "%s-%d:%d", desc, c->channel_type, c->channel_id); - CHANNEL_DEBUG(channel, "%s", __FUNCTION__); + CHANNEL_DEBUG(channel, ""); const char *disabled = g_getenv("SPICE_DISABLE_CHANNELS"); if (disabled && strstr(disabled, desc)) @@ -154,7 +154,7 @@ static void spice_channel_dispose(GObject *gobject) SpiceChannel *channel = SPICE_CHANNEL(gobject); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s %p", __FUNCTION__, gobject); + CHANNEL_DEBUG(channel, "%p", gobject); spice_channel_disconnect(channel, SPICE_CHANNEL_CLOSED); @@ -175,7 +175,7 @@ static void spice_channel_finalize(GObject *gobject) SpiceChannel *channel = SPICE_CHANNEL(gobject); SpiceChannelPrivate *c = channel->priv; - CHANNEL_DEBUG(channel, "%s %p", __FUNCTION__, gobject); + CHANNEL_DEBUG(channel, "%p", gobject); g_idle_remove_by_data(gobject); @@ -1825,8 +1825,8 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) c->peer_hdr.size - c->peer_pos); c->peer_pos += rc; if (c->peer_pos != c->peer_hdr.size) { - spice_critical("%s: %s: incomplete link reply (%d/%d)", - c->name, __FUNCTION__, rc, c->peer_hdr.size); + spice_critical("%s: incomplete link reply (%d/%d)", + c->name, rc, c->peer_hdr.size); goto error; } switch (c->peer_msg->error) { @@ -1839,8 +1839,8 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) c->tls = TRUE; return FALSE; default: - spice_warning("%s: %s: unhandled error %d", - c->name, __FUNCTION__, c->peer_msg->error); + spice_warning("%s: unhandled error %d", + c->name, c->peer_msg->error); goto error; } @@ -1848,7 +1848,7 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel) num_common_caps = GUINT32_FROM_LE(c->peer_msg->num_common_caps); num_caps = num_channel_caps + num_common_caps; - CHANNEL_DEBUG(channel, "%s: %d caps", __FUNCTION__, num_caps); + CHANNEL_DEBUG(channel, "%d caps", num_caps); /* see original spice/client code: */ /* g_return_if_fail(c->peer_msg + c->peer_msg->caps_offset * sizeof(uint32_t) > c->peer_msg + c->peer_hdr.size); */ @@ -2619,7 +2619,7 @@ static gboolean channel_connect(SpiceChannel *channel, gboolean tls) if (c->session == NULL || c->channel_type == -1 || c->channel_id == -1) { /* unset properties or unknown channel type */ - spice_warning("%s: channel setup incomplete", __FUNCTION__); + spice_warning("channel setup incomplete"); return false; } diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c index 54130ec..5ae0cd6 100644 --- a/src/spice-gstaudio.c +++ b/src/spice-gstaudio.c @@ -91,7 +91,7 @@ static void spice_gstaudio_dispose(GObject *obj) { SpiceGstaudio *gstaudio = SPICE_GSTAUDIO(obj); SpiceGstaudioPrivate *p; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p = gstaudio->priv; stream_dispose(&p->playback); @@ -149,7 +149,7 @@ static void record_stop(SpiceGstaudio *gstaudio) { SpiceGstaudioPrivate *p = gstaudio->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (p->record.pipe) gst_element_set_state(p->record.pipe, GST_STATE_READY); } diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c index d504d9c..2651fe7 100644 --- a/src/spice-gtk-session.c +++ b/src/spice-gtk-session.c @@ -599,7 +599,7 @@ static void clipboard_get_targets(GtkClipboard *clipboard, selection = get_selection_from_clipboard(s, clipboard); g_return_if_fail(selection != -1); - spice_debug("%s:", __FUNCTION__); + spice_debug(NULL); if (spice_util_get_debug()) { for (a = 0; a < n_atoms; a++) { name = gdk_atom_name(atoms[a]); diff --git a/src/spice-pulse.c b/src/spice-pulse.c index 26d6a3b..5c142da 100644 --- a/src/spice-pulse.c +++ b/src/spice-pulse.c @@ -132,7 +132,7 @@ static void spice_pulse_dispose(GObject *obj) SpicePulse *pulse = SPICE_PULSE(obj); SpicePulsePrivate *p; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p = pulse->priv; if (p->playback.uncork_op) @@ -253,7 +253,7 @@ static void pulse_cork_cb(pa_stream *pastream, int success, void *data) { struct stream *s = data; - spice_debug("%s: cork started", __FUNCTION__); + spice_debug("cork started"); if (!success) spice_warning("pulseaudio cork operation failed"); @@ -368,10 +368,10 @@ static void stream_update_latency_callback(pa_stream *s, void *userdata) spice_playback_channel_set_delay(SPICE_PLAYBACK_CHANNEL(p->pchannel), usec / 1000); if (pa_stream_is_corked(p->playback.stream)) { if (p->last_delay >= p->target_delay) { - spice_debug("%s: uncork playback. delay %u target %u", __FUNCTION__, p->last_delay, p->target_delay); + spice_debug("uncork playback. delay %u target %u", p->last_delay, p->target_delay); stream_uncork(pulse, &p->playback); } else { - spice_debug("%s: still corked. delay %u target %u", __FUNCTION__, p->last_delay, p->target_delay); + spice_debug("still corked. delay %u target %u", p->last_delay, p->target_delay); } } } @@ -439,7 +439,7 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan switch (state) { case PA_CONTEXT_READY: if (p->state != state) { - spice_debug("%s: pulse context ready", __FUNCTION__); + spice_debug("pulse context ready"); } if (p->playback.stream == NULL) { create_playback(pulse); @@ -448,8 +448,8 @@ static void playback_start(SpicePlaybackChannel *channel, gint format, gint chan break; default: if (p->state != state) { - spice_debug("%s: pulse context not ready (%s)", - __FUNCTION__, STATE_NAME(context_state_names, state)); + spice_debug("pulse context not ready (%s)", + STATE_NAME(context_state_names, state)); } break; } @@ -474,7 +474,7 @@ static void playback_data(SpicePlaybackChannel *channel, break; case PA_STREAM_READY: if (p->playback.state != state) { - spice_debug("%s: pulse playback stream ready", __FUNCTION__); + spice_debug("pulse playback stream ready"); } if (pa_stream_write(p->playback.stream, audio, size, NULL, 0, PA_SEEK_RELATIVE) < 0) { spice_warning("pa_stream_write() failed: %s", @@ -483,8 +483,8 @@ static void playback_data(SpicePlaybackChannel *channel, break; default: if (p->playback.state != state) { - spice_debug("%s: pulse playback stream not ready (%s)", - __FUNCTION__, STATE_NAME(stream_state_names, state)); + spice_debug("pulse playback stream not ready (%s)", + STATE_NAME(stream_state_names, state)); } break; } @@ -495,7 +495,7 @@ static void playback_stop(SpicePulse *pulse) { SpicePulsePrivate *p = pulse->priv; - spice_debug("%s: #underflow %u", __FUNCTION__, p->playback.num_underflow); + spice_debug("#underflow %u", p->playback.num_underflow); p->playback.started = FALSE; if (!p->playback.stream) @@ -591,7 +591,7 @@ static void record_start(SpiceRecordChannel *channel, gint format, gint channels switch (state) { case PA_CONTEXT_READY: if (p->state != state) { - spice_debug("%s: pulse context ready", __FUNCTION__); + spice_debug("pulse context ready"); } if (p->record.stream == NULL) { create_record(pulse); @@ -600,8 +600,8 @@ static void record_start(SpiceRecordChannel *channel, gint format, gint channels break; default: if (p->state != state) { - spice_warning("%s: pulse context not ready (%s)", - __FUNCTION__, STATE_NAME(context_state_names, state)); + spice_warning("pulse context not ready (%s)", + STATE_NAME(context_state_names, state)); } break; } @@ -612,7 +612,7 @@ static void record_stop(SpicePulse *pulse) { SpicePulsePrivate *p = pulse->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); p->record.started = FALSE; if (!p->record.stream) @@ -692,11 +692,11 @@ static void playback_min_latency_changed(GObject *object, GParamSpec *pspec, gpo p->target_delay = min_latency; if (p->last_delay < p->target_delay) { - spice_debug("%s: corking", __FUNCTION__); + spice_debug("corking"); if (p->playback.stream) stream_cork(pulse, &p->playback, FALSE); } else { - spice_debug("%s: not corking. The current delay satisfies the requirement", __FUNCTION__); + spice_debug("not corking. The current delay satisfies the requirement"); } } diff --git a/src/spice-session.c b/src/spice-session.c index 4cb5152..38566c0 100644 --- a/src/spice-session.c +++ b/src/spice-session.c @@ -2342,7 +2342,7 @@ void spice_session_set_mm_time(SpiceSession *session, guint32 time) spice_debug("set mm time: %u", spice_session_get_mm_time(session)); if (time > old_time + MM_TIME_DIFF_RESET_THRESH || time < old_time) { - spice_debug("%s: mm-time-reset, old %u, new %u", __FUNCTION__, old_time, s->mm_time); + spice_debug("mm-time-reset, old %u, new %u", old_time, s->mm_time); g_coroutine_signal_emit(session, signals[SPICE_SESSION_MM_TIME_RESET], 0); } } @@ -2554,7 +2554,7 @@ void spice_session_sync_playback_latency(SpiceSession *session) spice_playback_channel_is_active(s->playback_channel)) { spice_playback_channel_sync_latency(s->playback_channel); } else { - spice_debug("%s: not implemented when there isn't audio playback", __FUNCTION__); + spice_debug("not implemented when there isn't audio playback"); } } @@ -2580,7 +2580,7 @@ guint32 spice_session_get_playback_latency(SpiceSession *session) spice_playback_channel_is_active(s->playback_channel)) { return spice_playback_channel_get_latency(s->playback_channel); } else { - spice_debug("%s: not implemented when there isn't audio playback", __FUNCTION__); + spice_debug("not implemented when there isn't audio playback"); return 0; } } diff --git a/src/spice-util.c b/src/spice-util.c index 0dbcd9c..494fcff 100644 --- a/src/spice-util.c +++ b/src/spice-util.c @@ -270,8 +270,8 @@ const gchar* spice_yes_no(gboolean value) G_GNUC_INTERNAL guint16 spice_make_scancode(guint scancode, gboolean release) { - spice_debug("%s: %s scancode %d", - __FUNCTION__, release ? "release" : "", scancode); + spice_debug("%s scancode %d", + release ? "release" : "", scancode); if (release) { if (scancode < 0x100) diff --git a/src/spice-widget.c b/src/spice-widget.c index 2bf0179..cbc6140 100644 --- a/src/spice-widget.c +++ b/src/spice-widget.c @@ -484,7 +484,7 @@ static GdkCursor* get_blank_cursor(void) static gboolean grab_broken(SpiceDisplay *self, GdkEventGrabBroken *event, gpointer user_data G_GNUC_UNUSED) { - spice_debug("%s (implicit: %d, keyboard: %d)", __FUNCTION__, + spice_debug("(implicit: %d, keyboard: %d)", event->implicit, event->keyboard); if (event->keyboard) { @@ -519,7 +519,7 @@ static void drag_data_received_callback(SpiceDisplay *self, /* We get a buf like: * file:///root/a.txt\r\nfile:///root/b.txt\r\n */ - spice_debug("%s: drag a file", __FUNCTION__); + spice_debug("drag a file"); buf = gtk_selection_data_get_data(data); g_return_if_fail(buf != NULL); @@ -1301,7 +1301,7 @@ static void release_keys(SpiceDisplay *display) SpiceDisplayPrivate *d = display->priv; uint32_t i, b; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); for (i = 0; i < SPICE_N_ELEMENTS(d->key_state); i++) { if (!d->key_state[i]) { continue; @@ -1385,8 +1385,8 @@ static gboolean key_event(GtkWidget *widget, GdkEventKey *key) } #endif - spice_debug("%s %s: keycode: %d state: %d group %d modifier %d", - __FUNCTION__, key->type == GDK_KEY_PRESS ? "press" : "release", + spice_debug("%s: keycode: %d state: %d group %d modifier %d", + key->type == GDK_KEY_PRESS ? "press" : "release", key->hardware_keycode, key->state, key->group, key->is_modifier); if (!d->seq_pressed && check_for_grab_key_pressed(display, key->type, key->keyval)) { @@ -1476,7 +1476,7 @@ void spice_display_send_keys(SpiceDisplay *display, const guint *keyvals, g_return_if_fail(SPICE_IS_DISPLAY(display)); g_return_if_fail(keyvals != NULL); - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (kind & SPICE_DISPLAY_KEY_EVENT_PRESS) { for (i = 0 ; i < nkeyvals ; i++) @@ -1494,7 +1494,7 @@ static gboolean enter_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); d->mouse_have_pointer = true; spice_gtk_session_set_mouse_has_pointer(d->gtk_session, true); @@ -1509,7 +1509,7 @@ static gboolean leave_event(GtkWidget *widget, GdkEventCrossing *crossing G_GNUC SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (d->mouse_grab_active) return true; @@ -1526,7 +1526,7 @@ static gboolean focus_in_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_UN SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); /* * Ignore focus in when we already have the focus @@ -1554,7 +1554,7 @@ static gboolean focus_out_event(GtkWidget *widget, GdkEventFocus *focus G_GNUC_U SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); update_display(NULL); /* @@ -1692,7 +1692,7 @@ static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *scroll) SpiceDisplay *display = SPICE_DISPLAY(widget); SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); if (!d->inputs) return true; @@ -1721,7 +1721,7 @@ static gboolean button_event(GtkWidget *widget, GdkEventButton *button) SpiceDisplayPrivate *d = display->priv; int x, y; - spice_debug("%s %s: button %d, state 0x%x", __FUNCTION__, + spice_debug("%s: button %d, state 0x%x", button->type == GDK_BUTTON_PRESS ? "press" : "release", button->button, button->state); @@ -2459,11 +2459,11 @@ static void cursor_reset(SpiceCursorChannel *channel, gpointer data) GdkWindow *window = gtk_widget_get_window(GTK_WIDGET(display)); if (!window) { - spice_debug("%s: no window, returning", __FUNCTION__); + spice_debug("no window, returning"); return; } - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); gdk_window_set_cursor(window, NULL); } @@ -2477,7 +2477,7 @@ static void gl_scanout(SpiceDisplay *display) scanout = spice_display_get_gl_scanout(SPICE_DISPLAY_CHANNEL(d->display)); g_return_if_fail(scanout != NULL); - spice_debug("%s: got scanout", __FUNCTION__); + spice_debug("got scanout"); set_egl_enabled(display, true); if (!spice_egl_update_scanout(display, scanout, &err)) { @@ -2491,7 +2491,7 @@ static void gl_draw(SpiceDisplay *display, { SpiceDisplayPrivate *d = display->priv; - spice_debug("%s", __FUNCTION__); + spice_debug(NULL); set_egl_enabled(display, true); spice_egl_update_display(display); -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel