From 97da92d894c2a29bc3ccf60dc904e4099b30f47e Mon Sep 17 00:00:00 2001 From: =?utf8?q?poljar=20=28Damir=20Jeli=C4=87=29?= Date: Tue, 18 Jun 2013 22:17:48 +0200 Subject: [PATCH] Whitespace cleanup: Remove all multiple newlines This patch removes all occurrences of double and triple newlines. Command used for this: find . -type d \( -name ffmpeg \) -prune -o \ -regex '\(.*\.[hc]\|.*\.cc\)' \ -a -not -name 'adrian-aec.*' -a -not \ -name reserve.c -a -not -name 'rtkit.*' \ -exec sed -i -e '/^$/{N;s/^\n$//}' {} \; Two passes were needed to remove triple newlines. The excluded files are mirrored files from external sources. --- src/daemon/ltdl-bind-now.h | 1 - src/modules/alsa/alsa-mixer.c | 6 ------ src/modules/alsa/alsa-sink.c | 2 -- src/modules/alsa/alsa-source.c | 1 - src/modules/alsa/alsa-util.c | 1 - src/modules/bluetooth/module-bluetooth-proximity.c | 1 - src/modules/echo-cancel/module-echo-cancel.c | 2 -- src/modules/echo-cancel/speex.c | 1 - src/modules/echo-cancel/webrtc.cc | 1 - src/modules/jack/module-jackdbus-detect.c | 3 --- src/modules/module-combine.c | 1 - src/modules/module-console-kit.c | 1 - src/modules/module-device-manager.c | 7 ------- src/modules/module-device-restore.c | 4 ---- src/modules/module-equalizer-sink.c | 2 -- src/modules/module-filter-heuristics.c | 1 - src/modules/module-ladspa-sink.c | 2 -- src/modules/module-remap-source.c | 1 - src/modules/module-role-cork.c | 1 - src/modules/module-rygel-media-server.c | 1 - src/modules/module-stream-restore.c | 1 - src/modules/module-switch-on-port-available.c | 1 - src/modules/module-tunnel.c | 3 --- src/modules/module-virtual-source.c | 3 --- src/modules/oss/module-oss.c | 1 - src/modules/raop/raop_client.c | 7 ------- src/modules/rtp/rtsp_client.c | 11 ----------- src/modules/udev-util.h | 1 - src/modules/xen/module-xenpv-sink.c | 5 ----- src/pulse/channelmap.c | 1 - src/pulse/context.c | 2 -- src/pulse/internal.h | 1 - src/pulse/introspect.c | 1 - src/pulse/mainloop.c | 1 - src/pulse/scache.c | 1 - src/pulse/stream.c | 4 ---- src/pulsecore/arpa-inet.h | 2 -- src/pulsecore/cli-command.c | 1 - src/pulsecore/cli-text.c | 3 --- src/pulsecore/database-simple.c | 1 - src/pulsecore/device-port.c | 1 - src/pulsecore/esound.h | 3 --- src/pulsecore/fdsem.h | 1 - src/pulsecore/memblockq.h | 1 - src/pulsecore/object.h | 1 - src/pulsecore/poll.h | 1 - src/pulsecore/protocol-dbus.h | 1 - src/pulsecore/protocol-native.c | 3 --- src/pulsecore/remap.c | 1 - src/pulsecore/shmasyncq.c | 1 - src/pulsecore/shmasyncq.h | 1 - src/pulsecore/sink-input.c | 1 - src/pulsecore/sink-input.h | 1 - src/pulsecore/sink.c | 1 - src/pulsecore/sndfile-util.c | 2 -- src/pulsecore/socket-client.c | 1 - src/pulsecore/socket-util.c | 1 - src/pulsecore/source.c | 1 - src/pulsecore/svolume_sse.c | 1 - src/pulsecore/time-smoother.c | 1 - src/pulsecore/x11prop.c | 1 - src/tests/alsa-mixer-path-test.c | 1 - src/tests/mix-special-test.c | 1 - src/tests/mix-test.c | 1 - src/tests/remix-test.c | 1 - src/utils/pacmd.c | 1 - src/utils/pactl.c | 1 - src/utils/pasuspender.c | 1 - src/utils/pax11publish.c | 1 - 69 files changed, 125 deletions(-) diff --git a/src/daemon/ltdl-bind-now.h b/src/daemon/ltdl-bind-now.h index 07600706..332aad6c 100644 --- a/src/daemon/ltdl-bind-now.h +++ b/src/daemon/ltdl-bind-now.h @@ -22,7 +22,6 @@ USA. ***/ - void pa_ltdl_init(void); void pa_ltdl_done(void); diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c index 5775d679..f4410d74 100644 --- a/src/modules/alsa/alsa-mixer.c +++ b/src/modules/alsa/alsa-mixer.c @@ -275,7 +275,6 @@ struct pa_alsa_mixer_pdata { snd_mixer_t *mixer; }; - struct pa_alsa_mixer_pdata *pa_alsa_mixer_pdata_new(void) { struct pa_alsa_mixer_pdata *pd; @@ -383,8 +382,6 @@ int pa_alsa_set_mixer_rtpoll(struct pa_alsa_mixer_pdata *pd, snd_mixer_t *mixer, return 0; } - - static const snd_mixer_selem_channel_id_t alsa_channel_ids[PA_CHANNEL_POSITION_MAX] = { [PA_CHANNEL_POSITION_MONO] = SND_MIXER_SCHN_MONO, /* The ALSA name is just an alias! */ @@ -1768,7 +1765,6 @@ finish: return j; } - static pa_alsa_option* option_get(pa_alsa_path *p, const char *section) { char *en; const char *on; @@ -3022,7 +3018,6 @@ void pa_alsa_path_set_dump(pa_alsa_path_set *ps) { pa_alsa_path_dump(p); } - static pa_bool_t options_have_option(pa_alsa_option *options, const char *alsa_name) { pa_alsa_option *o; @@ -3785,7 +3780,6 @@ static void mapping_paths_probe(pa_alsa_mapping *m, pa_alsa_profile *profile, return; } - PA_HASHMAP_FOREACH(p, ps->paths, state) { if (pa_alsa_path_probe(p, mixer_handle, hctl_handle, m->profile_set->ignore_dB) < 0) { pa_hashmap_remove(ps->paths, p); diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index dc7146f8..aa6cf74d 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -580,7 +580,6 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle break; } - if (++j > 10) { #ifdef DEBUG_TIMING pa_log_debug("Not filling up, because already too many iterations."); @@ -722,7 +721,6 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle n_bytes = (size_t) n * u->frame_size; - #ifdef DEBUG_TIMING pa_log_debug("avail: %lu", (unsigned long) n_bytes); #endif diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index 77dbb865..6a53c4b5 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -539,7 +539,6 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled break; } - if (++j > 10) { #ifdef DEBUG_TIMING pa_log_debug("Not filling up, because already too many iterations."); diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c index 8d2286bf..168a6788 100644 --- a/src/modules/alsa/alsa-util.c +++ b/src/modules/alsa/alsa-util.c @@ -1474,7 +1474,6 @@ snd_hctl_elem_t* pa_alsa_find_eld_ctl(snd_hctl_t *hctl, int device) { return snd_hctl_find_elem(hctl, id); } - static int prepare_mixer(snd_mixer_t *mixer, const char *dev, snd_hctl_t **hctl) { int err; diff --git a/src/modules/bluetooth/module-bluetooth-proximity.c b/src/modules/bluetooth/module-bluetooth-proximity.c index b55dfdb1..c4e6ca61 100644 --- a/src/modules/bluetooth/module-bluetooth-proximity.c +++ b/src/modules/bluetooth/module-bluetooth-proximity.c @@ -346,7 +346,6 @@ static int update_matches(struct userdata *u, bool add) { } else dbus_bus_remove_match(pa_dbus_connection_get(u->dbus_connection), filter1, NULL); - if (add) { dbus_bus_add_match(pa_dbus_connection_get(u->dbus_connection), filter2, &e); diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index b45a40ce..1477d4be 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -462,7 +462,6 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of return pa_sink_process_msg(o, code, data, offset, chunk); } - /* Called from main context */ static int source_set_state_cb(pa_source *s, pa_source_state_t state) { struct userdata *u; @@ -1301,7 +1300,6 @@ static void sink_input_attach_cb(pa_sink_input *i) { pa_sink_attach_within_thread(u->sink); } - /* Called from source I/O thread context. */ static void source_output_detach_cb(pa_source_output *o) { struct userdata *u; diff --git a/src/modules/echo-cancel/speex.c b/src/modules/echo-cancel/speex.c index cef0aad0..37ce122a 100644 --- a/src/modules/echo-cancel/speex.c +++ b/src/modules/echo-cancel/speex.c @@ -146,7 +146,6 @@ fail: return FALSE; } - pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec, pa_sample_spec *rec_ss, pa_channel_map *rec_map, pa_sample_spec *play_ss, pa_channel_map *play_map, diff --git a/src/modules/echo-cancel/webrtc.cc b/src/modules/echo-cancel/webrtc.cc index 7517d4ad..697e0bae 100644 --- a/src/modules/echo-cancel/webrtc.cc +++ b/src/modules/echo-cancel/webrtc.cc @@ -91,7 +91,6 @@ pa_bool_t pa_webrtc_ec_init(pa_core *c, pa_echo_canceller *ec, goto fail; } - hpf = DEFAULT_HIGH_PASS_FILTER; if (pa_modargs_get_value_boolean(ma, "high_pass_filter", &hpf) < 0) { pa_log("Failed to parse high_pass_filter value"); diff --git a/src/modules/jack/module-jackdbus-detect.c b/src/modules/jack/module-jackdbus-detect.c index d8b218af..cadf4c29 100644 --- a/src/modules/jack/module-jackdbus-detect.c +++ b/src/modules/jack/module-jackdbus-detect.c @@ -76,7 +76,6 @@ static const char* const modnames[JACK_SS_COUNT] = { "module-jack-source" }; - struct userdata { pa_module *module; pa_core *core; @@ -89,7 +88,6 @@ struct userdata { int jack_module_index[JACK_SS_COUNT]; }; - static void ensure_ports_stopped(struct userdata* u) { int i; pa_assert(u); @@ -127,7 +125,6 @@ static void ensure_ports_started(struct userdata* u) { } } - static pa_bool_t check_service_started(struct userdata* u) { DBusError error; DBusMessage *m = NULL, *reply = NULL; diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c index 251df494..d3442359 100644 --- a/src/modules/module-combine.c +++ b/src/modules/module-combine.c @@ -56,7 +56,6 @@ int pa__init(pa_module*m) { return module ? 0 : -1; } - void pa__done(pa_module*m) { struct userdata *u; diff --git a/src/modules/module-console-kit.c b/src/modules/module-console-kit.c index af1e02b0..271af2a1 100644 --- a/src/modules/module-console-kit.c +++ b/src/modules/module-console-kit.c @@ -337,7 +337,6 @@ fail: return -1; } - void pa__done(pa_module *m) { struct userdata *u; diff --git a/src/modules/module-device-manager.c b/src/modules/module-device-manager.c index 5db55506..47c78d41 100644 --- a/src/modules/module-device-manager.c +++ b/src/modules/module-device-manager.c @@ -149,14 +149,12 @@ enum { SUBCOMMAND_EVENT }; - /* Forward declarations */ #ifdef DUMP_DATABASE static void dump_database(struct userdata *); #endif static void notify_subscribers(struct userdata *); - static void save_time_callback(pa_mainloop_api*a, pa_time_event* e, const struct timeval *t, void *userdata) { struct userdata *u = userdata; @@ -631,7 +629,6 @@ static void update_highest_priority_device_indexes(struct userdata *u, const cha } } - static void route_sink_input(struct userdata *u, pa_sink_input *si) { const char *role; uint32_t role_index, device_index; @@ -1003,7 +1000,6 @@ static pa_hook_result_t source_output_new_hook_callback(pa_core *c, pa_source_ou return PA_HOOK_OK; } - static pa_hook_result_t sink_put_hook_callback(pa_core *c, PA_GCC_UNUSED pa_sink *sink, struct userdata *u) { pa_assert(c); pa_assert(u); @@ -1058,7 +1054,6 @@ static pa_hook_result_t source_unlink_hook_callback(pa_core *c, pa_source *sourc return route_source_outputs(u, source); } - static void apply_entry(struct userdata *u, const char *name, struct entry *e) { uint32_t idx; char *n; @@ -1101,7 +1096,6 @@ static void apply_entry(struct userdata *u, const char *name, struct entry *e) { } } - #define EXT_VERSION 1 static int extension_cb(pa_native_protocol *p, pa_module *m, pa_native_connection *c, uint32_t tag, pa_tagstruct *t) { @@ -1600,7 +1594,6 @@ int pa__init(pa_module*m) { for (uint32_t j = 0; j < i; ++j) subscribe_callback(m->core, PA_SUBSCRIPTION_EVENT_SINK|PA_SUBSCRIPTION_EVENT_NEW, p_i[j].index, u); - /* We cycle over all the available sources so that they are added to our database if they are not in it yet */ i = 0; PA_IDXSET_FOREACH(source, m->core->sources, idx) { diff --git a/src/modules/module-device-restore.c b/src/modules/module-device-restore.c index 8360a05a..17728307 100644 --- a/src/modules/module-device-restore.c +++ b/src/modules/module-device-restore.c @@ -111,7 +111,6 @@ enum { SUBCOMMAND_SAVE_FORMATS }; - #define ENTRY_VERSION 1 struct entry { @@ -173,7 +172,6 @@ static void trigger_save(struct userdata *u, pa_device_type_t type, uint32_t sin u->save_time_event = pa_core_rttime_new(u->core, pa_rtclock_now() + SAVE_INTERVAL, save_time_callback, u); } - #ifdef ENABLE_LEGACY_DATABASE_ENTRY_FORMAT /* Some forward declarations */ static pa_bool_t legacy_entry_read(struct userdata *u, pa_datum *data, struct entry **entry, struct perportentry **perportentry); @@ -685,7 +683,6 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3 } } - pa_assert(e); if (olde) { @@ -706,7 +703,6 @@ static void subscribe_callback(pa_core *c, pa_subscription_event_type_t t, uint3 entry_free(e); } - pa_assert(ppe); if (oldppe) { diff --git a/src/modules/module-equalizer-sink.c b/src/modules/module-equalizer-sink.c index 505e60b7..59073ce2 100644 --- a/src/modules/module-equalizer-sink.c +++ b/src/modules/module-equalizer-sink.c @@ -274,7 +274,6 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of return pa_sink_process_msg(o, code, data, offset, chunk); } - /* Called from main context */ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) { struct userdata *u; @@ -1856,7 +1855,6 @@ void equalizer_handle_seed_filter(DBusConnection *conn, DBusMessage *msg, void * pa_aupdate_write_end(u->a_H[r_channel]); pa_xfree(ys); - pa_dbus_send_empty_reply(conn, msg); pa_assert_se((message = dbus_message_new_signal(u->dbus_path, EQUALIZER_IFACE, equalizer_signals[EQUALIZER_SIGNAL_FILTER_CHANGED].name))); diff --git a/src/modules/module-filter-heuristics.c b/src/modules/module-filter-heuristics.c index e158b952..17e56030 100644 --- a/src/modules/module-filter-heuristics.c +++ b/src/modules/module-filter-heuristics.c @@ -166,7 +166,6 @@ fail: return -1; - } void pa__done(pa_module *m) { diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c index 6a757e4e..2ffcd8da 100644 --- a/src/modules/module-ladspa-sink.c +++ b/src/modules/module-ladspa-sink.c @@ -944,7 +944,6 @@ static int write_control_parameters(struct userdata *u, double *control_values, return 0; } - int pa__init(pa_module*m) { struct userdata *u; pa_sample_spec ss; @@ -1145,7 +1144,6 @@ int pa__init(pa_module*m) { } } - u->block_size = pa_frame_align(pa_mempool_block_size_max(m->core->mempool), &ss); /* Create buffers */ diff --git a/src/modules/module-remap-source.c b/src/modules/module-remap-source.c index c47d9b08..7c350855 100644 --- a/src/modules/module-remap-source.c +++ b/src/modules/module-remap-source.c @@ -4,7 +4,6 @@ Copyright 2013 bct electronic GmbH Contributor: Stefan Huber - PulseAudio is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, diff --git a/src/modules/module-role-cork.c b/src/modules/module-role-cork.c index 6e6ea725..ea71ea6e 100644 --- a/src/modules/module-role-cork.c +++ b/src/modules/module-role-cork.c @@ -278,7 +278,6 @@ fail: return -1; - } void pa__done(pa_module *m) { diff --git a/src/modules/module-rygel-media-server.c b/src/modules/module-rygel-media-server.c index 855d7bbf..4ba106a6 100644 --- a/src/modules/module-rygel-media-server.c +++ b/src/modules/module-rygel-media-server.c @@ -160,7 +160,6 @@ PA_MODULE_USAGE("display_name="); " " \ "" - static const char* const valid_modargs[] = { "display_name", NULL diff --git a/src/modules/module-stream-restore.c b/src/modules/module-stream-restore.c index 23f47801..7b731323 100644 --- a/src/modules/module-stream-restore.c +++ b/src/modules/module-stream-restore.c @@ -144,7 +144,6 @@ enum { SUBCOMMAND_EVENT }; - static struct entry* entry_new(void); static void entry_free(struct entry *e); static struct entry *entry_read(struct userdata *u, const char *name); diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c index 8c49db85..df6ce97b 100644 --- a/src/modules/module-switch-on-port-available.c +++ b/src/modules/module-switch-on-port-available.c @@ -286,7 +286,6 @@ static pa_hook_result_t source_new_hook_callback(pa_core *c, pa_source_new_data return PA_HOOK_OK; } - int pa__init(pa_module*m) { struct userdata *u; diff --git a/src/modules/module-tunnel.c b/src/modules/module-tunnel.c index bc2c0c4c..7b430fba 100644 --- a/src/modules/module-tunnel.c +++ b/src/modules/module-tunnel.c @@ -517,13 +517,11 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse return 0; - case SINK_MESSAGE_REMOTE_SUSPEND: stream_suspend_within_thread(u, !!PA_PTR_TO_UINT(data)); return 0; - case SINK_MESSAGE_UPDATE_LATENCY: { pa_usec_t y; @@ -1029,7 +1027,6 @@ static int read_ports(struct userdata *u, pa_tagstruct *t) { return 0; } - static int read_formats(struct userdata *u, pa_tagstruct *t) { uint8_t n_formats; pa_format_info *format; diff --git a/src/modules/module-virtual-source.c b/src/modules/module-virtual-source.c index 90495344..6720f8b0 100644 --- a/src/modules/module-virtual-source.c +++ b/src/modules/module-virtual-source.c @@ -153,7 +153,6 @@ static void sink_update_requested_latency_cb(pa_sink *s) { } - /* Called from I/O thread context */ static void sink_request_rewind_cb(pa_sink *s) { struct userdata *u; @@ -349,7 +348,6 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk) pa_source_post(u->source, chunk); } - } /* Called from input thread context */ @@ -467,7 +465,6 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) { } } - int pa__init(pa_module*m) { struct userdata *u; pa_sample_spec ss; diff --git a/src/modules/oss/module-oss.c b/src/modules/oss/module-oss.c index fbf0d7ca..70834697 100644 --- a/src/modules/oss/module-oss.c +++ b/src/modules/oss/module-oss.c @@ -175,7 +175,6 @@ static int trigger(struct userdata *u, pa_bool_t quick) { pa_log_debug("trigger: %i", enable_bits); - if (u->use_mmap) { if (!quick) diff --git a/src/modules/raop/raop_client.c b/src/modules/raop/raop_client.c index b11cafba..2c2aa195 100644 --- a/src/modules/raop/raop_client.c +++ b/src/modules/raop/raop_client.c @@ -70,7 +70,6 @@ #define RAOP_PORT 5000 - struct pa_raop_client { pa_core *core; char *host; @@ -392,7 +391,6 @@ pa_raop_client* pa_raop_client_new(pa_core *core, const char* host) { return c; } - void pa_raop_client_free(pa_raop_client* c) { pa_assert(c); @@ -404,7 +402,6 @@ void pa_raop_client_free(pa_raop_client* c) { pa_xfree(c); } - int pa_raop_connect(pa_raop_client* c) { char *sci; struct { @@ -438,7 +435,6 @@ int pa_raop_connect(pa_raop_client* c) { return pa_rtsp_connect(c->rtsp); } - int pa_raop_flush(pa_raop_client* c) { pa_assert(c); @@ -446,7 +442,6 @@ int pa_raop_flush(pa_raop_client* c) { return 0; } - int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume) { int rv; double db; @@ -468,7 +463,6 @@ int pa_raop_client_set_volume(pa_raop_client* c, pa_volume_t volume) { return rv; } - int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchunk* encoded) { uint16_t len; size_t bufmax; @@ -550,7 +544,6 @@ int pa_raop_client_encode_sample(pa_raop_client* c, pa_memchunk* raw, pa_memchun return 0; } - void pa_raop_client_set_callback(pa_raop_client* c, pa_raop_client_cb_t callback, void *userdata) { pa_assert(c); diff --git a/src/modules/rtp/rtsp_client.c b/src/modules/rtp/rtsp_client.c index 90521fe6..50724391 100644 --- a/src/modules/rtp/rtsp_client.c +++ b/src/modules/rtp/rtsp_client.c @@ -96,7 +96,6 @@ pa_rtsp_client* pa_rtsp_client_new(pa_mainloop_api *mainloop, const char* hostna return c; } - void pa_rtsp_client_free(pa_rtsp_client* c) { pa_assert(c); @@ -120,7 +119,6 @@ void pa_rtsp_client_free(pa_rtsp_client* c) { pa_xfree(c); } - static void headers_read(pa_rtsp_client *c) { char* token; char delimiters[] = ";"; @@ -171,7 +169,6 @@ static void headers_read(pa_rtsp_client *c) { c->callback(c, c->state, c->response_headers, c->userdata); } - static void line_callback(pa_ioline *line, const char *s, void *userdata) { char *delimpos; char *s2, *s2p; @@ -278,7 +275,6 @@ static void line_callback(pa_ioline *line, const char *s, void *userdata) { pa_xfree(s2); } - static void on_connection(pa_socket_client *sc, pa_iochannel *io, void *userdata) { pa_rtsp_client *c = userdata; union { @@ -359,7 +355,6 @@ void pa_rtsp_disconnect(pa_rtsp_client *c) { c->ioline = NULL; } - const char* pa_rtsp_localip(pa_rtsp_client* c) { pa_assert(c); @@ -448,7 +443,6 @@ static int rtsp_exec(pa_rtsp_client* c, const char* cmd, return 0; } - int pa_rtsp_announce(pa_rtsp_client *c, const char* sdp) { pa_assert(c); if (!sdp) @@ -458,7 +452,6 @@ int pa_rtsp_announce(pa_rtsp_client *c, const char* sdp) { return rtsp_exec(c, "ANNOUNCE", "application/sdp", sdp, 1, NULL); } - int pa_rtsp_setup(pa_rtsp_client* c) { pa_headerlist* headers; int rv; @@ -474,7 +467,6 @@ int pa_rtsp_setup(pa_rtsp_client* c) { return rv; } - int pa_rtsp_record(pa_rtsp_client* c, uint16_t* seq, uint32_t* rtptime) { pa_headerlist* headers; int rv; @@ -501,7 +493,6 @@ int pa_rtsp_record(pa_rtsp_client* c, uint16_t* seq, uint32_t* rtptime) { return rv; } - int pa_rtsp_teardown(pa_rtsp_client *c) { pa_assert(c); @@ -509,7 +500,6 @@ int pa_rtsp_teardown(pa_rtsp_client *c) { return rtsp_exec(c, "TEARDOWN", NULL, NULL, 0, NULL); } - int pa_rtsp_setparameter(pa_rtsp_client *c, const char* param) { pa_assert(c); if (!param) @@ -519,7 +509,6 @@ int pa_rtsp_setparameter(pa_rtsp_client *c, const char* param) { return rtsp_exec(c, "SET_PARAMETER", "text/parameters", param, 1, NULL); } - int pa_rtsp_flush(pa_rtsp_client *c, uint16_t seq, uint32_t rtptime) { pa_headerlist* headers; int rv; diff --git a/src/modules/udev-util.h b/src/modules/udev-util.h index a978178f..251575bb 100644 --- a/src/modules/udev-util.h +++ b/src/modules/udev-util.h @@ -22,7 +22,6 @@ USA. ***/ - #include int pa_udev_get_info(int card_idx, pa_proplist *p); diff --git a/src/modules/xen/module-xenpv-sink.c b/src/modules/xen/module-xenpv-sink.c index 66630176..2d4879f9 100644 --- a/src/modules/xen/module-xenpv-sink.c +++ b/src/modules/xen/module-xenpv-sink.c @@ -278,11 +278,9 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse static int process_render(struct userdata *u) { pa_assert(u); - if (u->memchunk.length <= 0) pa_sink_render(u->sink, ioring->usable_buffer_space, &u->memchunk); - pa_assert(u->memchunk.length > 0); xc_evtchn_notify(xce, xen_evtchn_port); @@ -583,7 +581,6 @@ void pa__done(pa_module*m) { } - static int alloc_gref(struct ioctl_gntalloc_alloc_gref *gref_, void **addr) { int alloc_fd, dev_fd, rv; @@ -701,7 +698,6 @@ static char* read_param(const char *paramname) { return xs_read(xsh, 0, keybuf, &len); } - static int publish_spec(pa_sample_spec *sample_spec) { /* Publish spec and set state to XenbusStateInitWait*/ int ret; @@ -713,7 +709,6 @@ static int publish_spec(pa_sample_spec *sample_spec) { return ret; } - static int read_backend_default_spec(pa_sample_spec *sample_spec) { /* Read spec from backend */ char *out; diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c index 0d199f35..f635cc17 100644 --- a/src/pulse/channelmap.c +++ b/src/pulse/channelmap.c @@ -392,7 +392,6 @@ pa_channel_map* pa_channel_map_init_auto(pa_channel_map *m, unsigned channels, p return NULL; } - default: pa_assert_not_reached(); } diff --git a/src/pulse/context.c b/src/pulse/context.c index 71764125..11dac151 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -1368,7 +1368,6 @@ finish: pa_context_unref(c); } - void pa_command_client_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) { pa_context *c = userdata; pa_proplist *pl = NULL; @@ -1428,7 +1427,6 @@ void pa_context_rttime_restart(pa_context *c, pa_time_event *e, pa_usec_t usec) pa_assert(PA_REFCNT_VALUE(c) >= 1); pa_assert(c->mainloop); - if (usec == PA_USEC_INVALID) c->mainloop->time_restart(e, NULL); else { diff --git a/src/pulse/internal.h b/src/pulse/internal.h index e72e2854..dd27f5f0 100644 --- a/src/pulse/internal.h +++ b/src/pulse/internal.h @@ -275,7 +275,6 @@ pa_tagstruct *pa_tagstruct_command(pa_context *c, uint32_t command, uint32_t *ta return -pa_context_set_error((context), (error)); \ } while(FALSE) - #define PA_CHECK_VALIDITY_RETURN_ANY(context, expression, error, value) \ do { \ if (!(expression)) { \ diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c index 9ca3fd36..704e96ea 100644 --- a/src/pulse/introspect.c +++ b/src/pulse/introspect.c @@ -1838,7 +1838,6 @@ static void context_index_callback(pa_pdispatch *pd, uint32_t command, uint32_t cb(o->context, idx, o->userdata); } - finish: pa_operation_done(o); pa_operation_unref(o); diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c index a3d7715d..f1ce076a 100644 --- a/src/pulse/mainloop.c +++ b/src/pulse/mainloop.c @@ -568,7 +568,6 @@ static void cleanup_defer_events(pa_mainloop *m, pa_bool_t force) { pa_assert(m->defer_events_please_scan == 0); } - void pa_mainloop_free(pa_mainloop *m) { pa_assert(m); diff --git a/src/pulse/scache.c b/src/pulse/scache.c index 3fad82a1..8902642f 100644 --- a/src/pulse/scache.c +++ b/src/pulse/scache.c @@ -167,7 +167,6 @@ finish: pa_operation_unref(o); } - pa_operation *pa_context_play_sample(pa_context *c, const char *name, const char *dev, pa_volume_t volume, pa_context_success_cb_t cb, void *userdata) { pa_operation *o; pa_tagstruct *t; diff --git a/src/pulse/stream.c b/src/pulse/stream.c index 508bfa11..811b3c10 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -1215,7 +1215,6 @@ static int create_stream( PA_STREAM_RELATIVE_VOLUME| PA_STREAM_PASSTHROUGH)), PA_ERR_INVALID); - PA_CHECK_VALIDITY(s->context, s->context->version >= 12 || !(flags & PA_STREAM_VARIABLE_RATE), PA_ERR_NOTSUPPORTED); PA_CHECK_VALIDITY(s->context, s->context->version >= 13 || !(flags & PA_STREAM_PEAK_DETECT), PA_ERR_NOTSUPPORTED); PA_CHECK_VALIDITY(s->context, s->context->state == PA_CONTEXT_READY, PA_ERR_BADSTATE); @@ -1816,7 +1815,6 @@ static void stream_get_timing_info_callback(pa_pdispatch *pd, uint32_t command, goto finish; } - if (!pa_tagstruct_eof(t)) { pa_context_fail(o->context, PA_ERR_PROTOCOL); goto finish; @@ -2632,7 +2630,6 @@ finish: pa_operation_unref(o); } - pa_operation* pa_stream_set_buffer_attr(pa_stream *s, const pa_buffer_attr *attr, pa_stream_success_cb_t cb, void *userdata) { pa_operation *o; pa_tagstruct *t; @@ -2779,7 +2776,6 @@ finish: pa_operation_unref(o); } - pa_operation *pa_stream_update_sample_rate(pa_stream *s, uint32_t rate, pa_stream_success_cb_t cb, void *userdata) { pa_operation *o; pa_tagstruct *t; diff --git a/src/pulsecore/arpa-inet.h b/src/pulsecore/arpa-inet.h index 303c905b..d940f704 100644 --- a/src/pulsecore/arpa-inet.h +++ b/src/pulsecore/arpa-inet.h @@ -1,7 +1,6 @@ #ifndef fooarpa_inethfoo #define fooarpa_inethfoo - #if defined(HAVE_ARPA_INET_H) #include @@ -19,5 +18,4 @@ int inet_pton(int af, const char *src, void *dst); #endif - #endif diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c index e374694e..866cd161 100644 --- a/src/pulsecore/cli-command.c +++ b/src/pulsecore/cli-command.c @@ -1282,7 +1282,6 @@ static int pa_cli_command_play_file(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, return -1; } - return pa_play_file(sink, fname, NULL); } diff --git a/src/pulsecore/cli-text.c b/src/pulsecore/cli-text.c index 9b31e97d..1cf68d01 100644 --- a/src/pulsecore/cli-text.c +++ b/src/pulsecore/cli-text.c @@ -255,7 +255,6 @@ char *pa_sink_list_to_string(pa_core *c) { cmn = pa_channel_map_to_pretty_name(&sink->channel_map); - pa_strbuf_printf( s, " %c index: %u\n" @@ -470,7 +469,6 @@ char *pa_source_list_to_string(pa_core *c) { return pa_strbuf_tostring_free(s); } - char *pa_source_output_list_to_string(pa_core *c) { pa_strbuf *s; pa_source_output *o; @@ -512,7 +510,6 @@ char *pa_source_output_list_to_string(pa_core *c) { } else volume_str = pa_xstrdup("n/a"); - pa_strbuf_printf( s, " index: %u\n" diff --git a/src/pulsecore/database-simple.c b/src/pulsecore/database-simple.c index 91c1b457..f0dbcdce 100644 --- a/src/pulsecore/database-simple.c +++ b/src/pulsecore/database-simple.c @@ -37,7 +37,6 @@ #include "database.h" - typedef struct simple_data { char *filename; char *tmp_filename; diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c index 7c1b2eca..57d02938 100644 --- a/src/pulsecore/device-port.c +++ b/src/pulsecore/device-port.c @@ -105,7 +105,6 @@ static void device_port_free(pa_object *o) { pa_xfree(p); } - pa_device_port *pa_device_port_new(pa_core *c, pa_device_port_new_data *data, size_t extra) { pa_device_port *p; diff --git a/src/pulsecore/esound.h b/src/pulsecore/esound.h index 965f4db7..5d6ec950 100644 --- a/src/pulsecore/esound.h +++ b/src/pulsecore/esound.h @@ -24,7 +24,6 @@ /* Most of the following is blatantly stolen from esound. */ - /* path and name of the default EsounD domain socket */ #define ESD_UNIX_SOCKET_DIR "/tmp/.esd" #define ESD_UNIX_SOCKET_NAME "/tmp/.esd/socket" @@ -51,7 +50,6 @@ #define ESD_VOLUME_BASE (256) - /*************************************/ /* what can we do to/with the EsounD */ enum esd_proto { @@ -205,5 +203,4 @@ typedef int esd_client_state_t; /* server and the client match; if it's SWAP_ENDIAN_KEY, swap data */ #define ESD_SWAP_ENDIAN_KEY (PA_UINT32_SWAP(ESD_ENDIAN_KEY)) - #endif diff --git a/src/pulsecore/fdsem.h b/src/pulsecore/fdsem.h index 90e8599a..a434ac3b 100644 --- a/src/pulsecore/fdsem.h +++ b/src/pulsecore/fdsem.h @@ -50,5 +50,4 @@ int pa_fdsem_get(pa_fdsem *f); int pa_fdsem_before_poll(pa_fdsem *f); int pa_fdsem_after_poll(pa_fdsem *f); - #endif diff --git a/src/pulsecore/memblockq.h b/src/pulsecore/memblockq.h index 88906ba4..a81ab85b 100644 --- a/src/pulsecore/memblockq.h +++ b/src/pulsecore/memblockq.h @@ -37,7 +37,6 @@ typedef struct pa_memblockq pa_memblockq; - /* Parameters: - name: name for debugging purposes diff --git a/src/pulsecore/object.h b/src/pulsecore/object.h index 8be429ee..c6057714 100644 --- a/src/pulsecore/object.h +++ b/src/pulsecore/object.h @@ -116,5 +116,4 @@ static inline pa_object* pa_object_cast(void *o) { } \ struct __stupid_useless_struct_to_allow_trailing_semicolon - #endif diff --git a/src/pulsecore/poll.h b/src/pulsecore/poll.h index dc741e5e..8905dd20 100644 --- a/src/pulsecore/poll.h +++ b/src/pulsecore/poll.h @@ -49,7 +49,6 @@ struct pollfd { short int revents; /* Types of events that actually occurred. */ }; - /* Poll the file descriptors described by the NFDS structures starting at FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for an event to occur; if TIMEOUT is -1, block until an event occurs. diff --git a/src/pulsecore/protocol-dbus.h b/src/pulsecore/protocol-dbus.h index 89999337..aac7423c 100644 --- a/src/pulsecore/protocol-dbus.h +++ b/src/pulsecore/protocol-dbus.h @@ -110,7 +110,6 @@ typedef struct pa_dbus_interface_info { unsigned n_signals; } pa_dbus_interface_info; - /* The following functions may only be called from the main thread. */ /* Registers the given interface to the given object path. It doesn't matter diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c index 2f0a9902..1fa2b382 100644 --- a/src/pulsecore/protocol-native.c +++ b/src/pulsecore/protocol-native.c @@ -1589,7 +1589,6 @@ static int sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int return pa_sink_input_process_msg(o, code, userdata, offset, chunk); } - static bool handle_input_underrun(playback_stream *s, bool force) { bool send_drain; @@ -1625,7 +1624,6 @@ static bool sink_input_process_underrun_cb(pa_sink_input *i) { return handle_input_underrun(s, true); } - /* Called from thread context */ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk) { playback_stream *s; @@ -2455,7 +2453,6 @@ static void command_create_record_stream(pa_pdispatch *pd, uint32_t command, uin } } - if (!pa_tagstruct_eof(t)) { protocol_error(c); goto finish; diff --git a/src/pulsecore/remap.c b/src/pulsecore/remap.c index 5d0cd62c..8585e341 100644 --- a/src/pulsecore/remap.c +++ b/src/pulsecore/remap.c @@ -178,7 +178,6 @@ static void init_remap_c(pa_remap_t *m) { } } - /* default C implementation */ static pa_init_remap_func_t remap_func = init_remap_c; diff --git a/src/pulsecore/shmasyncq.c b/src/pulsecore/shmasyncq.c index eac56adb..e6599a99 100644 --- a/src/pulsecore/shmasyncq.c +++ b/src/pulsecore/shmasyncq.c @@ -46,7 +46,6 @@ #define _Y do { } while(0) #endif - struct pa_shmasyncq { pa_fdsem *read_fdsem, *write_fdsem; pa_shmasyncq_data *data; diff --git a/src/pulsecore/shmasyncq.h b/src/pulsecore/shmasyncq.h index 4212055e..67ce6071 100644 --- a/src/pulsecore/shmasyncq.h +++ b/src/pulsecore/shmasyncq.h @@ -28,7 +28,6 @@ /* Similar to pa_asyncq, but stores data in a shared memory segment */ - struct pa_shmasyncq_data { unsigned n_elements; size_t element_size; diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c index 8666c605..2cc0738d 100644 --- a/src/pulsecore/sink-input.c +++ b/src/pulsecore/sink-input.c @@ -1063,7 +1063,6 @@ bool pa_sink_input_process_underrun(pa_sink_input *i) { return false; } - /* Called from thread context */ void pa_sink_input_process_rewind(pa_sink_input *i, size_t nbytes /* in sink sample spec */) { size_t lbq; diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h index 47bdaed3..fcd15451 100644 --- a/src/pulsecore/sink-input.h +++ b/src/pulsecore/sink-input.h @@ -415,7 +415,6 @@ pa_usec_t pa_sink_input_set_requested_latency_within_thread(pa_sink_input *i, pa pa_bool_t pa_sink_input_safe_to_remove(pa_sink_input *i); bool pa_sink_input_process_underrun(pa_sink_input *i); - pa_memchunk* pa_sink_input_get_silence(pa_sink_input *i, pa_memchunk *ret); #define pa_sink_input_assert_io_context(s) \ diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index a2376690..cf3a90eb 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -148,7 +148,6 @@ void pa_sink_new_data_done(pa_sink_new_data *data) { pa_xfree(data->active_port); } - /* Called from main context */ static void reset_callbacks(pa_sink *s) { pa_assert(s); diff --git a/src/pulsecore/sndfile-util.c b/src/pulsecore/sndfile-util.c index 365c9b6d..0820ee4b 100644 --- a/src/pulsecore/sndfile-util.c +++ b/src/pulsecore/sndfile-util.c @@ -144,7 +144,6 @@ int pa_sndfile_write_sample_spec(SF_INFO *sfi, pa_sample_spec *ss) { break; } - if (!pa_sample_spec_valid(ss)) return -1; @@ -418,7 +417,6 @@ pa_sndfile_writef_t pa_sndfile_writef_function(const pa_sample_spec *ss) { int pa_sndfile_format_from_string(const char *name) { int i, count = 0; - if (!name[0]) return -1; diff --git a/src/pulsecore/socket-client.c b/src/pulsecore/socket-client.c index 23d5d880..a12757a8 100644 --- a/src/pulsecore/socket-client.c +++ b/src/pulsecore/socket-client.c @@ -226,7 +226,6 @@ pa_socket_client* pa_socket_client_new_ipv4(pa_mainloop_api *m, uint32_t address return pa_socket_client_new_sockaddr(m, (struct sockaddr*) &sa, sizeof(sa)); } - pa_socket_client* pa_socket_client_new_unix(pa_mainloop_api *m, const char *filename) { #ifdef HAVE_SYS_UN_H struct sockaddr_un sa; diff --git a/src/pulsecore/socket-util.c b/src/pulsecore/socket-util.c index 2b8d4634..68119d17 100644 --- a/src/pulsecore/socket-util.c +++ b/src/pulsecore/socket-util.c @@ -280,7 +280,6 @@ int pa_unix_socket_remove_stale(const char *fn) { #endif /* HAVE_SYS_UN_H */ - pa_bool_t pa_socket_address_is_local(const struct sockaddr *sa) { pa_assert(sa); diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index cba518bb..98a8bcc3 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -2779,7 +2779,6 @@ pa_bool_t pa_source_volume_change_apply(pa_source *s, pa_usec_t *usec_to_next) { return ret; } - /* Called from the main thread */ /* Gets the list of formats supported by the source. The members and idxset must * be freed by the caller. */ diff --git a/src/pulsecore/svolume_sse.c b/src/pulsecore/svolume_sse.c index daa87ca3..9979087b 100644 --- a/src/pulsecore/svolume_sse.c +++ b/src/pulsecore/svolume_sse.c @@ -73,7 +73,6 @@ " por %%xmm4, "#s1" \n\t" /* .. | l h | */ \ " por %%xmm5, "#s2" \n\t" - static int channel_overread_table[8] = {8,8,8,12,8,10,12,14}; static void pa_volume_s16ne_sse2(int16_t *samples, const int32_t *volumes, unsigned channels, unsigned length) { diff --git a/src/pulsecore/time-smoother.c b/src/pulsecore/time-smoother.c index 7a61a75c..9b4a9505 100644 --- a/src/pulsecore/time-smoother.c +++ b/src/pulsecore/time-smoother.c @@ -134,7 +134,6 @@ void pa_smoother_free(pa_smoother* s) { x = ((x)+1) % HISTORY_MAX; \ } while(FALSE) - static void drop_old(pa_smoother *s, pa_usec_t x) { /* Drop items from history which are too old, but make sure to diff --git a/src/pulsecore/x11prop.c b/src/pulsecore/x11prop.c index baf5b018..0fa30a3f 100644 --- a/src/pulsecore/x11prop.c +++ b/src/pulsecore/x11prop.c @@ -100,7 +100,6 @@ char* pa_x11_get_prop(xcb_connection_t *xcb, int screen, const char *name, char pa_assert(name); pa_assert(p); - xs = screen_of_display(xcb, screen); /* * Also try and get the settings from the first screen. diff --git a/src/tests/alsa-mixer-path-test.c b/src/tests/alsa-mixer-path-test.c index f2bc4cbf..ac92d78b 100644 --- a/src/tests/alsa-mixer-path-test.c +++ b/src/tests/alsa-mixer-path-test.c @@ -53,7 +53,6 @@ static pa_strlist *load_makefile() { return result; } - START_TEST (mixer_path_test) { DIR *dir; struct dirent *ent; diff --git a/src/tests/mix-special-test.c b/src/tests/mix-special-test.c index df86ccbb..3d36116a 100644 --- a/src/tests/mix-special-test.c +++ b/src/tests/mix-special-test.c @@ -194,7 +194,6 @@ static void pa_mix_generic_s16ne(pa_mix_info streams[], unsigned nstreams, unsig } } - #define SAMPLES 1028 #define TIMES 1000 #define TIMES2 100 diff --git a/src/tests/mix-test.c b/src/tests/mix-test.c index 4980dd0b..e2ef4906 100644 --- a/src/tests/mix-test.c +++ b/src/tests/mix-test.c @@ -35,7 +35,6 @@ #include #include - /* PA_SAMPLE_U8 */ static const uint8_t u8_result[3][10] = { { 0x00, 0xff, 0x7f, 0x80, 0x9f, 0x3f, 0x01, 0xf0, 0x20, 0x21 }, diff --git a/src/tests/remix-test.c b/src/tests/remix-test.c index 19f5582b..9d169bea 100644 --- a/src/tests/remix-test.c +++ b/src/tests/remix-test.c @@ -76,7 +76,6 @@ int main(int argc, char *argv[]) { pa_resampler_free(r); } - pa_mempool_free(pool); return 0; diff --git a/src/utils/pacmd.c b/src/utils/pacmd.c index dc477aae..352a9d85 100644 --- a/src/utils/pacmd.c +++ b/src/utils/pacmd.c @@ -168,7 +168,6 @@ int main(int argc, char*argv[]) { goto quit; } - if (r >= 0) break; diff --git a/src/utils/pactl.c b/src/utils/pactl.c index f52e37c6..b3dca781 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -715,7 +715,6 @@ static void get_source_output_info_callback(pa_context *c, const pa_source_outpu printf("\n"); nl = TRUE; - pa_snprintf(t, sizeof(t), "%u", i->owner_module); pa_snprintf(k, sizeof(k), "%u", i->client); diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c index 0da570e1..5ede7f4c 100644 --- a/src/utils/pasuspender.c +++ b/src/utils/pasuspender.c @@ -59,7 +59,6 @@ static void quit(int ret) { mainloop_api->quit(mainloop_api, ret); } - static void context_drain_complete(pa_context *c, void *userdata) { pa_context_disconnect(c); } diff --git a/src/utils/pax11publish.c b/src/utils/pax11publish.c index 16cf8666..c5e6cfbb 100644 --- a/src/utils/pax11publish.c +++ b/src/utils/pax11publish.c @@ -40,7 +40,6 @@ #include #include - int main(int argc, char *argv[]) { const char *dname = NULL, *sink = NULL, *source = NULL, *server = NULL, *cookie_file = PA_NATIVE_COOKIE_FILE; int c, ret = 1, screen = 0; -- 2.39.2