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; return res;
} }
int init_data(struct data *data) static int init_data(struct data *data)
{ {
int res; int res;
const char *str; const char *str;

View file

@ -457,7 +457,7 @@ static int load_handle(struct data *data, struct spa_handle **handle, const char
return -EBADF; return -EBADF;
} }
int init_data(struct data *data) static int init_data(struct data *data)
{ {
int res; int res;
const char *str; 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, 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) 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); conv_s24_to_f32d_1s_avx2(conv, &dst[i], &s[3*i], n_channels, n_samples);
} }
static void
void
conv_s32_to_f32d_4s_avx2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src, 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) 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, 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) 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, 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) 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); conv_s24_to_f32d_1s_sse2(conv, &dst[i], &s[3*i], n_channels, n_samples);
} }
static void
void
conv_s32_to_f32d_1s_sse2(void *data, void * SPA_RESTRICT dst[], const void * SPA_RESTRICT src, 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) 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; 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, .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 impl *backend = (void *)data;
struct transport_data *td = t->user_data; struct transport_data *td = t->user_data;

View file

@ -308,7 +308,7 @@ static void group_destroy(struct group *group)
free(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; struct stream *stream;
void *codec_data = NULL; void *codec_data = NULL;

View file

@ -202,7 +202,7 @@ static int read_probe(struct impl *impl, MidiEnumCharacteristicProxy *chr)
return 0; 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)); const char *path = g_dbus_proxy_get_object_path(G_DBUS_PROXY(chr));
Bluez5GattDescriptor1 *found = NULL;; Bluez5GattDescriptor1 *found = NULL;;

View file

@ -39,7 +39,7 @@ struct impl {
uint32_t vm_type; 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; int n, fd;

View file

@ -7,7 +7,7 @@
#include "aecp-aem-descriptors.h" #include "aecp-aem-descriptors.h"
#include "internal.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, server_add_descriptor(server, AVB_AEM_DESC_STRINGS, 0,
sizeof(struct avb_aem_desc_strings), sizeof(struct avb_aem_desc_strings),

View file

@ -744,7 +744,7 @@ do_schedule_destroy(struct spa_loop *loop,
return 0; 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); 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); 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; struct pw_core *core = object;
int64_t generation; int64_t generation;
@ -106,7 +106,7 @@ int demarshal_core_generation(void *object, struct spa_pod_parser *parser)
return 0; 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; struct pw_impl_client *client = object;
int64_t generation; int64_t generation;

View file

@ -506,7 +506,7 @@ do_schedule_destroy(struct spa_loop *loop,
return 0; 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); 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 #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; struct pw_rtkit_bus *bus;
DBusError error; DBusError error;
@ -240,17 +240,17 @@ error:
return NULL; 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); 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); 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)) { 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); 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; 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_close(system_bus->bus);
dbus_connection_unref(system_bus->bus); dbus_connection_unref(system_bus->bus);
@ -369,7 +369,7 @@ finish:
return ret; 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; long long retval;
int err; int err;
@ -378,7 +378,7 @@ int pw_rtkit_get_max_realtime_priority(struct impl *impl)
return err < 0 ? err : retval; 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; long long retval;
int err; int err;
@ -389,7 +389,7 @@ int pw_rtkit_get_min_nice_level(struct impl *impl, int *min_nice_level)
return err; 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; long long retval;
int err; int err;
@ -398,7 +398,7 @@ long long pw_rtkit_get_rttime_usec_max(struct impl *impl)
return err < 0 ? err : retval; 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; DBusMessage *m = NULL, *r = NULL;
dbus_uint64_t pid; dbus_uint64_t pid;
@ -458,7 +458,7 @@ finish:
return ret; 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; DBusMessage *m = NULL, *r = NULL;
dbus_uint64_t pid; dbus_uint64_t pid;