mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
* remove a lot of compiler warnings introduced by using some new GCC flags
* add typedefs for public structs and enums and drop the struct/enum prefixs from all uses where it makes sense git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@447 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
6c512fb5a3
commit
1f0961368f
200 changed files with 3582 additions and 3468 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#include "scache.h"
|
||||
#include "subscribe.h"
|
||||
|
||||
static void entry_free(struct pa_autoload_entry *e) {
|
||||
static void entry_free(pa_autoload_entry *e) {
|
||||
assert(e);
|
||||
pa_subscription_post(e->core, PA_SUBSCRIPTION_EVENT_AUTOLOAD|PA_SUBSCRIPTION_EVENT_REMOVE, PA_INVALID_INDEX);
|
||||
pa_xfree(e->name);
|
||||
|
|
@ -45,7 +45,7 @@ static void entry_free(struct pa_autoload_entry *e) {
|
|||
pa_xfree(e);
|
||||
}
|
||||
|
||||
static void entry_remove_and_free(struct pa_autoload_entry *e) {
|
||||
static void entry_remove_and_free(pa_autoload_entry *e) {
|
||||
assert(e && e->core);
|
||||
|
||||
pa_idxset_remove_by_data(e->core->autoload_idxset, e, NULL);
|
||||
|
|
@ -53,14 +53,14 @@ static void entry_remove_and_free(struct pa_autoload_entry *e) {
|
|||
entry_free(e);
|
||||
}
|
||||
|
||||
static struct pa_autoload_entry* entry_new(struct pa_core *c, const char *name) {
|
||||
struct pa_autoload_entry *e = NULL;
|
||||
static pa_autoload_entry* entry_new(pa_core *c, const char *name) {
|
||||
pa_autoload_entry *e = NULL;
|
||||
assert(c && name);
|
||||
|
||||
if (c->autoload_hashmap && (e = pa_hashmap_get(c->autoload_hashmap, name)))
|
||||
return NULL;
|
||||
|
||||
e = pa_xmalloc(sizeof(struct pa_autoload_entry));
|
||||
e = pa_xmalloc(sizeof(pa_autoload_entry));
|
||||
e->core = c;
|
||||
e->name = pa_xstrdup(name);
|
||||
e->module = e->argument = NULL;
|
||||
|
|
@ -81,8 +81,8 @@ static struct pa_autoload_entry* entry_new(struct pa_core *c, const char *name)
|
|||
return e;
|
||||
}
|
||||
|
||||
int pa_autoload_add(struct pa_core *c, const char*name, enum pa_namereg_type type, const char*module, const char *argument, uint32_t *index) {
|
||||
struct pa_autoload_entry *e = NULL;
|
||||
int pa_autoload_add(pa_core *c, const char*name, pa_namereg_type type, const char*module, const char *argument, uint32_t *idx) {
|
||||
pa_autoload_entry *e = NULL;
|
||||
assert(c && name && module && (type == PA_NAMEREG_SINK || type == PA_NAMEREG_SOURCE));
|
||||
|
||||
if (!(e = entry_new(c, name)))
|
||||
|
|
@ -92,14 +92,14 @@ int pa_autoload_add(struct pa_core *c, const char*name, enum pa_namereg_type typ
|
|||
e->argument = pa_xstrdup(argument);
|
||||
e->type = type;
|
||||
|
||||
if (index)
|
||||
*index = e->index;
|
||||
if (idx)
|
||||
*idx = e->index;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pa_autoload_remove_by_name(struct pa_core *c, const char*name, enum pa_namereg_type type) {
|
||||
struct pa_autoload_entry *e;
|
||||
int pa_autoload_remove_by_name(pa_core *c, const char*name, pa_namereg_type type) {
|
||||
pa_autoload_entry *e;
|
||||
assert(c && name && type);
|
||||
|
||||
if (!c->autoload_hashmap || !(e = pa_hashmap_get(c->autoload_hashmap, name)) || e->type != type)
|
||||
|
|
@ -109,20 +109,20 @@ int pa_autoload_remove_by_name(struct pa_core *c, const char*name, enum pa_namer
|
|||
return 0;
|
||||
}
|
||||
|
||||
int pa_autoload_remove_by_index(struct pa_core *c, uint32_t index) {
|
||||
struct pa_autoload_entry *e;
|
||||
assert(c && index != PA_IDXSET_INVALID);
|
||||
int pa_autoload_remove_by_index(pa_core *c, uint32_t idx) {
|
||||
pa_autoload_entry *e;
|
||||
assert(c && idx != PA_IDXSET_INVALID);
|
||||
|
||||
if (!c->autoload_idxset || !(e = pa_idxset_get_by_index(c->autoload_idxset, index)))
|
||||
if (!c->autoload_idxset || !(e = pa_idxset_get_by_index(c->autoload_idxset, idx)))
|
||||
return -1;
|
||||
|
||||
entry_remove_and_free(e);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void pa_autoload_request(struct pa_core *c, const char *name, enum pa_namereg_type type) {
|
||||
struct pa_autoload_entry *e;
|
||||
struct pa_module *m;
|
||||
void pa_autoload_request(pa_core *c, const char *name, pa_namereg_type type) {
|
||||
pa_autoload_entry *e;
|
||||
pa_module *m;
|
||||
assert(c && name);
|
||||
|
||||
if (!c->autoload_hashmap || !(e = pa_hashmap_get(c->autoload_hashmap, name)) || (e->type != type))
|
||||
|
|
@ -141,13 +141,13 @@ void pa_autoload_request(struct pa_core *c, const char *name, enum pa_namereg_ty
|
|||
e->in_action = 0;
|
||||
}
|
||||
|
||||
static void free_func(void *p, void *userdata) {
|
||||
struct pa_autoload_entry *e = p;
|
||||
static void free_func(void *p, PA_GCC_UNUSED void *userdata) {
|
||||
pa_autoload_entry *e = p;
|
||||
pa_idxset_remove_by_data(e->core->autoload_idxset, e, NULL);
|
||||
entry_free(e);
|
||||
}
|
||||
|
||||
void pa_autoload_free(struct pa_core *c) {
|
||||
void pa_autoload_free(pa_core *c) {
|
||||
if (c->autoload_hashmap) {
|
||||
pa_hashmap_free(c->autoload_hashmap, free_func, NULL);
|
||||
c->autoload_hashmap = NULL;
|
||||
|
|
@ -159,8 +159,8 @@ void pa_autoload_free(struct pa_core *c) {
|
|||
}
|
||||
}
|
||||
|
||||
const struct pa_autoload_entry* pa_autoload_get_by_name(struct pa_core *c, const char*name, enum pa_namereg_type type) {
|
||||
struct pa_autoload_entry *e;
|
||||
const pa_autoload_entry* pa_autoload_get_by_name(pa_core *c, const char*name, pa_namereg_type type) {
|
||||
pa_autoload_entry *e;
|
||||
assert(c && name);
|
||||
|
||||
if (!c->autoload_hashmap || !(e = pa_hashmap_get(c->autoload_hashmap, name)) || e->type != type)
|
||||
|
|
@ -169,11 +169,11 @@ const struct pa_autoload_entry* pa_autoload_get_by_name(struct pa_core *c, const
|
|||
return e;
|
||||
}
|
||||
|
||||
const struct pa_autoload_entry* pa_autoload_get_by_index(struct pa_core *c, uint32_t index) {
|
||||
struct pa_autoload_entry *e;
|
||||
assert(c && index != PA_IDXSET_INVALID);
|
||||
const pa_autoload_entry* pa_autoload_get_by_index(pa_core *c, uint32_t idx) {
|
||||
pa_autoload_entry *e;
|
||||
assert(c && idx != PA_IDXSET_INVALID);
|
||||
|
||||
if (!c->autoload_idxset || !(e = pa_idxset_get_by_index(c->autoload_idxset, index)))
|
||||
if (!c->autoload_idxset || !(e = pa_idxset_get_by_index(c->autoload_idxset, idx)))
|
||||
return NULL;
|
||||
|
||||
return e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue