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:
Barnabás Pőcze 2021-09-29 13:22:41 +02:00 committed by Wim Taymans
parent b292a71220
commit 25a0e3beb4
5 changed files with 26 additions and 8 deletions

View file

@ -45,7 +45,10 @@ spa_dbus_lib = shared_library('spa-dbus',
if systemd_dep.found()
spa_journal_sources = ['journal.c']
spa_journal_sources = [
'journal.c',
'log-patterns.c',
]
spa_journal_lib = shared_library('spa-journal',
spa_journal_sources,