libobs: Cleanup unused-parameters

- Add OBS_UNUSED to unused function parameters
- Remove unnecessary UNUSED_PARAMETER
Also update libobs-opengl/
master
Norihiro Kamae 2022-07-15 16:18:37 +09:00 committed by Ryan Foster
parent 4f49968f92
commit af3890a4a9
11 changed files with 11 additions and 14 deletions

View File

@ -178,7 +178,7 @@ create_dmabuf_egl_image(EGLDisplay egl_display, unsigned int width,
}
struct gs_texture *gl_egl_create_texture_from_eglimage(
EGLDisplay egl_display, uint32_t width, uint32_t height,
EGLDisplay egl_display OBS_UNUSED, uint32_t width, uint32_t height,
enum gs_color_format color_format, EGLint target, EGLImage image)
{
UNUSED_PARAMETER(target);

View File

@ -120,7 +120,8 @@ extern void device_present(gs_device_t *device)
gl_vtable->device_present(device);
}
extern bool device_is_monitor_hdr(gs_device_t *device, void *monitor)
extern bool device_is_monitor_hdr(gs_device_t *device OBS_UNUSED,
void *monitor OBS_UNUSED)
{
return false;
}

View File

@ -1202,9 +1202,9 @@ void device_flush(gs_device_t *device)
glFlush();
#else
glFlush();
#endif
UNUSED_PARAMETER(device);
#endif
}
void device_set_cull_mode(gs_device_t *device, enum gs_cull_mode mode)

View File

@ -384,8 +384,10 @@ static bool gl_wayland_egl_device_query_dmabuf_modifiers_for_format(
}
static struct gs_texture *gl_wayland_egl_device_texture_create_from_pixmap(
gs_device_t *device, uint32_t width, uint32_t height,
enum gs_color_format color_format, uint32_t target, void *pixmap)
gs_device_t *device OBS_UNUSED, uint32_t width OBS_UNUSED,
uint32_t height OBS_UNUSED,
enum gs_color_format color_format OBS_UNUSED,
uint32_t target OBS_UNUSED, void *pixmap OBS_UNUSED)
{
return NULL;
}

View File

@ -266,7 +266,6 @@ gl_x11_egl_windowinfo_create(const struct gs_init_data *info)
static void gl_x11_egl_windowinfo_destroy(struct gl_windowinfo *info)
{
UNUSED_PARAMETER(info);
bfree(info);
}

View File

@ -61,8 +61,6 @@ static void on_audio_playback(void *param, obs_source_t *source,
float vol = source->user_volume;
uint32_t bytes;
UNUSED_PARAMETER(source);
if (!os_atomic_load_bool(&monitor->active)) {
return;
}

View File

@ -551,8 +551,6 @@ static void volmeter_source_data_received(void *vptr, obs_source_t *source,
pthread_mutex_unlock(&volmeter->mutex);
signal_levels_updated(volmeter, magnitude, peak, input_peak);
UNUSED_PARAMETER(source);
}
obs_fader_t *obs_fader_create(enum obs_fader_type type)

View File

@ -593,7 +593,6 @@ static inline bool find_pair_id(obs_hotkey_pair_id id, size_t *idx)
static inline bool pair_pointer_fixup_func(size_t idx, obs_hotkey_pair_t *pair,
void *data)
{
UNUSED_PARAMETER(idx);
UNUSED_PARAMETER(data);
if (find_id(pair->id[0], &idx))

View File

@ -216,7 +216,6 @@ static void platform_registry_handler(void *data, struct wl_registry *registry,
uint32_t id, const char *interface,
uint32_t version)
{
UNUSED_PARAMETER(version);
obs_hotkeys_platform_t *plat = (obs_hotkeys_platform_t *)data;
if (strcmp(interface, wl_seat_interface.name) == 0) {

View File

@ -2353,7 +2353,6 @@ bool save_transform_states(obs_scene_t *scene, obs_sceneitem_t *item,
obs_data_array_release(nids);
}
UNUSED_PARAMETER(scene);
return true;
}

View File

@ -162,4 +162,6 @@ void *bmemdup(const void *ptr, size_t size)
return out;
}
OBS_DEPRECATED void base_set_allocator(struct base_allocator *defs) {}
OBS_DEPRECATED void base_set_allocator(struct base_allocator *defs OBS_UNUSED)
{
}