mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
spa: support: do not include C source file
Previously, `log-patterns.c` was included in two other source files (`journal.c` and `logger.c`). It was also specified in the sources list for the libspa-support library, which resulted in the unnecessary independent compilation of the file, generating "defined but not used" warnings. Extract the function definitions into `log-patterns.h` and use that in `journal.c` and `logger.c`, and remove the inclusion of `log-patterns.c` from both.
This commit is contained in:
parent
b292a71220
commit
25a0e3beb4
5 changed files with 26 additions and 8 deletions
|
|
@ -29,13 +29,15 @@
|
|||
#include <spa/utils/list.h>
|
||||
#include <spa/utils/json.h>
|
||||
|
||||
#include "log-patterns.h"
|
||||
|
||||
struct support_log_pattern {
|
||||
struct spa_list link;
|
||||
enum spa_log_level level;
|
||||
char pattern[];
|
||||
};
|
||||
|
||||
static void
|
||||
void
|
||||
support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_level,
|
||||
struct spa_log_topic *t)
|
||||
{
|
||||
|
|
@ -53,7 +55,7 @@ support_log_topic_init(struct spa_list *patterns, enum spa_log_level default_lev
|
|||
t->level = level;
|
||||
}
|
||||
|
||||
static int
|
||||
int
|
||||
support_log_parse_patterns(struct spa_list *patterns, const char *jsonstr)
|
||||
{
|
||||
struct spa_json iter, array, elem;
|
||||
|
|
@ -94,7 +96,7 @@ support_log_parse_patterns(struct spa_list *patterns, const char *jsonstr)
|
|||
return res;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
support_log_free_patterns(struct spa_list *patterns)
|
||||
{
|
||||
struct support_log_pattern *p, *tmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue