treewide: mark some functions static

These were found by enabling the "missing-declarations" warning.
This commit is contained in:
Barnabás Pőcze 2023-07-03 04:34:59 +02:00
parent ab6ff1bcde
commit 8c17a6626d
14 changed files with 27 additions and 29 deletions

View File

@ -176,7 +176,7 @@ exit_cleanup:
return res;
}
int init_data(struct data *data)
static int init_data(struct data *data)
{
int res;
const char *str;

View File

@ -457,7 +457,7 @@ static int load_handle(struct data *data, struct spa_handle **handle, const char
return -EBADF;
}
int init_data(struct data *data)
static int init_data(struct data *data)
{
int res;
const char *str;

View File

@ -132,7 +132,7 @@ conv_s16_to_f32d_2_avx2(struct convert *conv, void * SPA_RESTRICT dst[], const v
}
}
void
static void
conv_s24_to_f32d_1s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src,
uint32_t n_channels, uint32_t n_samples)
{
@ -308,8 +308,7 @@ conv_s24_to_f32d_avx2(struct convert *conv, void * SPA_RESTRICT dst[], const voi
conv_s24_to_f32d_1s_avx2(conv, &dst[i], &s[3*i], n_channels, n_samples);
}
void
static void
conv_s32_to_f32d_4s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src,
uint32_t n_channels, uint32_t n_samples)
{
@ -375,7 +374,7 @@ conv_s32_to_f32d_4s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA
}
}
void
static void
conv_s32_to_f32d_2s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src,
uint32_t n_channels, uint32_t n_samples)
{
@ -423,7 +422,7 @@ conv_s32_to_f32d_2s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA
}
}
void
static void
conv_s32_to_f32d_1s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src,
uint32_t n_channels, uint32_t n_samples)
{

View File

@ -315,8 +315,7 @@ conv_s24_to_f32d_sse2(struct convert *conv, void * SPA_RESTRICT dst[], const voi
conv_s24_to_f32d_1s_sse2(conv, &dst[i], &s[3*i], n_channels, n_samples);
}
void
static void
conv_s32_to_f32d_1s_sse2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src,
uint32_t n_channels, uint32_t n_samples)
{

View File

@ -2708,7 +2708,7 @@ static void set_call_setup(enum call_setup value, void *user_data)
}
}
void set_battery_level(unsigned int level, void *user_data)
static void set_battery_level(unsigned int level, void *user_data)
{
struct impl *backend = user_data;

View File

@ -307,7 +307,7 @@ static const struct spa_bt_transport_implementation ofono_transport_impl = {
.release = ofono_audio_release,
};
bool activate_transport(struct spa_bt_transport *t, const void *data)
static bool activate_transport(struct spa_bt_transport *t, const void *data)
{
struct impl *backend = (void *)data;
struct transport_data *td = t->user_data;

View File

@ -308,7 +308,7 @@ static void group_destroy(struct group *group)
free(group);
}
struct stream *stream_create(struct spa_bt_transport *t, struct group *group)
static struct stream *stream_create(struct spa_bt_transport *t, struct group *group)
{
struct stream *stream;
void *codec_data = NULL;

View File

@ -202,7 +202,7 @@ static int read_probe(struct impl *impl, MidiEnumCharacteristicProxy *chr)
return 0;
}
Bluez5GattDescriptor1 *find_dsc(struct impl *impl, MidiEnumCharacteristicProxy *chr)
static Bluez5GattDescriptor1 *find_dsc(struct impl *impl, MidiEnumCharacteristicProxy *chr)
{
const char *path = g_dbus_proxy_get_object_path(G_DBUS_PROXY(chr));
Bluez5GattDescriptor1 *found = NULL;;

View File

@ -39,7 +39,7 @@ struct impl {
uint32_t vm_type;
};
char *spa_cpu_read_file(const char *name, char *buffer, size_t len)
static char *spa_cpu_read_file(const char *name, char *buffer, size_t len)
{
int n, fd;

View File

@ -7,7 +7,7 @@
#include "aecp-aem-descriptors.h"
#include "internal.h"
void init_descriptors(struct server *server)
static inline void init_descriptors(struct server *server)
{
server_add_descriptor(server, AVB_AEM_DESC_STRINGS, 0,
sizeof(struct avb_aem_desc_strings),

View File

@ -744,7 +744,7 @@ do_schedule_destroy(struct spa_loop *loop,
return 0;
}
void module_schedule_destroy(struct impl *impl)
static void module_schedule_destroy(struct impl *impl)
{
pw_loop_invoke(impl->main_loop, do_schedule_destroy, 1, NULL, 0, false, impl);
}

View File

@ -89,7 +89,7 @@ void marshal_client_footers(struct footer_client_global_state *state, struct pw_
end_footer(&fb);
}
int demarshal_core_generation(void *object, struct spa_pod_parser *parser)
static int demarshal_core_generation(void *object, struct spa_pod_parser *parser)
{
struct pw_core *core = object;
int64_t generation;
@ -106,7 +106,7 @@ int demarshal_core_generation(void *object, struct spa_pod_parser *parser)
return 0;
}
int demarshal_client_generation(void *object, struct spa_pod_parser *parser)
static int demarshal_client_generation(void *object, struct spa_pod_parser *parser)
{
struct pw_impl_client *client = object;
int64_t generation;

View File

@ -506,7 +506,7 @@ do_schedule_destroy(struct spa_loop *loop,
return 0;
}
void module_schedule_destroy(struct impl *impl)
static void module_schedule_destroy(struct impl *impl)
{
pw_loop_invoke(impl->main_loop, do_schedule_destroy, 1, NULL, 0, false, impl);
}

View File

@ -207,7 +207,7 @@ static pid_t _gettid(void)
}
#ifdef HAVE_DBUS
struct pw_rtkit_bus *pw_rtkit_bus_get(DBusBusType bus_type)
static struct pw_rtkit_bus *pw_rtkit_bus_get(DBusBusType bus_type)
{
struct pw_rtkit_bus *bus;
DBusError error;
@ -240,17 +240,17 @@ error:
return NULL;
}
struct pw_rtkit_bus *pw_rtkit_bus_get_system(void)
static struct pw_rtkit_bus *pw_rtkit_bus_get_system(void)
{
return pw_rtkit_bus_get(DBUS_BUS_SYSTEM);
}
struct pw_rtkit_bus *pw_rtkit_bus_get_session(void)
static struct pw_rtkit_bus *pw_rtkit_bus_get_session(void)
{
return pw_rtkit_bus_get(DBUS_BUS_SESSION);
}
bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
static bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
{
if (!dbus_bus_name_has_owner(system_bus->bus, XDG_PORTAL_SERVICE_NAME, NULL)) {
pw_log_info("Can't find %s. Is xdg-desktop-portal running?", XDG_PORTAL_SERVICE_NAME);
@ -260,7 +260,7 @@ bool pw_rtkit_check_xdg_portal(struct pw_rtkit_bus *system_bus)
return true;
}
void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
static void pw_rtkit_bus_free(struct pw_rtkit_bus *system_bus)
{
dbus_connection_close(system_bus->bus);
dbus_connection_unref(system_bus->bus);
@ -369,7 +369,7 @@ finish:
return ret;
}
int pw_rtkit_get_max_realtime_priority(struct impl *impl)
static int pw_rtkit_get_max_realtime_priority(struct impl *impl)
{
long long retval;
int err;
@ -378,7 +378,7 @@ int pw_rtkit_get_max_realtime_priority(struct impl *impl)
return err < 0 ? err : retval;
}
int pw_rtkit_get_min_nice_level(struct impl *impl, int *min_nice_level)
static int pw_rtkit_get_min_nice_level(struct impl *impl, int *min_nice_level)
{
long long retval;
int err;
@ -389,7 +389,7 @@ int pw_rtkit_get_min_nice_level(struct impl *impl, int *min_nice_level)
return err;
}
long long pw_rtkit_get_rttime_usec_max(struct impl *impl)
static long long pw_rtkit_get_rttime_usec_max(struct impl *impl)
{
long long retval;
int err;
@ -398,7 +398,7 @@ long long pw_rtkit_get_rttime_usec_max(struct impl *impl)
return err < 0 ? err : retval;
}
int pw_rtkit_make_realtime(struct impl *impl, pid_t thread, int priority)
static int pw_rtkit_make_realtime(struct impl *impl, pid_t thread, int priority)
{
DBusMessage *m = NULL, *r = NULL;
dbus_uint64_t pid;
@ -458,7 +458,7 @@ finish:
return ret;
}
int pw_rtkit_make_high_priority(struct impl *impl, pid_t thread, int nice_level)
static int pw_rtkit_make_high_priority(struct impl *impl, pid_t thread, int nice_level)
{
DBusMessage *m = NULL, *r = NULL;
dbus_uint64_t pid;