mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
Initialise variables
These were detected using clang static analyzer.
This commit is contained in:
parent
3b76d8065f
commit
92219b01b9
5 changed files with 9 additions and 6 deletions
|
|
@ -916,7 +916,7 @@ static DBusHandlerResult filter_cb(DBusConnection *bus, DBusMessage *m, void *us
|
|||
return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
|
||||
} else if (dbus_message_is_signal(m, "org.bluez.MediaTransport", "PropertyChanged")) {
|
||||
pa_bluetooth_device *d;
|
||||
pa_bluetooth_transport *t;
|
||||
pa_bluetooth_transport *t = NULL;
|
||||
void *state = NULL;
|
||||
DBusMessageIter arg_i;
|
||||
|
||||
|
|
@ -1112,7 +1112,7 @@ static DBusMessage *endpoint_set_configuration(DBusConnection *conn, DBusMessage
|
|||
const char *path, *dev_path = NULL, *uuid = NULL;
|
||||
uint8_t *config = NULL;
|
||||
int size = 0;
|
||||
pa_bool_t nrec;
|
||||
pa_bool_t nrec = FALSE;
|
||||
enum profile p;
|
||||
DBusMessageIter args, props;
|
||||
DBusMessage *r;
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ static const char* const valid_modargs[] = {
|
|||
|
||||
int pa__init(pa_module*m) {
|
||||
pa_modargs *ma = NULL;
|
||||
int ret = -1, fd = -1;
|
||||
int ret = -1;
|
||||
int32_t fd = -1;
|
||||
char x = 1;
|
||||
|
||||
pa_assert(m);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ static const char* const valid_modargs[] = {
|
|||
int pa__init(pa_module*m) {
|
||||
pa_iochannel *io;
|
||||
pa_modargs *ma;
|
||||
int32_t fd;
|
||||
int32_t fd = -1;
|
||||
int r = -1;
|
||||
pa_native_options *options = NULL;
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ int pa__init(pa_module*m) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0) {
|
||||
if (pa_modargs_get_value_s32(ma, "fd", &fd) < 0 || fd < 0) {
|
||||
pa_log("Invalid file descriptor.");
|
||||
goto finish;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ int pa__init(pa_module*m) {
|
|||
}
|
||||
|
||||
ss = m->core->default_sample_spec;
|
||||
map = m->core->default_channel_map;
|
||||
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) {
|
||||
pa_log("Invalid sample format specification or channel map");
|
||||
goto fail;
|
||||
|
|
|
|||
|
|
@ -1061,7 +1061,8 @@ static playback_stream* playback_stream_new(
|
|||
/* Note: This function takes ownership of the 'formats' param, so we need
|
||||
* to take extra care to not leak it */
|
||||
|
||||
playback_stream *s, *ssync;
|
||||
playback_stream *ssync;
|
||||
playback_stream *s = NULL;
|
||||
pa_sink_input *sink_input = NULL;
|
||||
pa_memchunk silence;
|
||||
uint32_t idx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue