plugins: Cleanup unused-parameters

- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
master
Norihiro Kamae 2022-07-15 16:54:01 +09:00 committed by Ryan Foster
parent 4ca0273a57
commit 7e3656ab33
21 changed files with 2 additions and 41 deletions

View File

@ -241,8 +241,6 @@ void populate_sdi_4k_transport_list(obs_property_t *list)
bool aja_video_format_changed(obs_properties_t *props, obs_property_t *list,
obs_data_t *settings)
{
UNUSED_PARAMETER(list);
auto vid_fmt = static_cast<NTV2VideoFormat>(
obs_data_get_int(settings, kUIPropVideoFormatSelect.id));
size_t itemCount = obs_property_list_item_count(list);

View File

@ -868,8 +868,6 @@ bool aja_output_device_changed(void *data, obs_properties_t *props,
bool aja_output_dest_changed(obs_properties_t *props, obs_property_t *list,
obs_data_t *settings)
{
UNUSED_PARAMETER(props);
blog(LOG_DEBUG, "AJA Output Dest Changed");
const char *cardID = obs_data_get_string(settings, kUIPropDevice.id);

View File

@ -31,8 +31,6 @@ static void color_source_update(void *data, obs_data_t *settings)
static void *color_source_create(obs_data_t *settings, obs_source_t *source)
{
UNUSED_PARAMETER(source);
struct color_source *context = bzalloc(sizeof(struct color_source));
context->src = source;

View File

@ -382,7 +382,8 @@ static enum gs_color_format gs_format_from_tex()
}
}
static int silence_x11_errors(Display *display, XErrorEvent *err)
static int silence_x11_errors(Display *display OBS_UNUSED,
XErrorEvent *err OBS_UNUSED)
{
return 0;
}

View File

@ -710,7 +710,6 @@ static void on_state_changed_cb(void *user_data, enum pw_stream_state old,
enum pw_stream_state state, const char *error)
{
UNUSED_PARAMETER(old);
UNUSED_PARAMETER(error);
obs_pipewire_data *obs_pw = user_data;
@ -736,8 +735,6 @@ static void on_core_info_cb(void *user_data, const struct pw_core_info *info)
static void on_core_error_cb(void *user_data, uint32_t id, int seq, int res,
const char *message)
{
UNUSED_PARAMETER(seq);
obs_pipewire_data *obs_pw = user_data;
blog(LOG_ERROR, "[pipewire] Error id:%u seq:%d res:%d (%s): %s", id,

View File

@ -600,7 +600,6 @@ init_screencast_capture(struct screencast_portal_capture *capture)
{
GDBusConnection *connection;
GDBusProxy *proxy;
char *aux;
capture->cancellable = g_cancellable_new();
connection = portal_get_dbus_connection();

View File

@ -150,7 +150,6 @@ static inline void display_stream_update(struct display_capture *dc,
CGDisplayStreamUpdateRef update_ref)
{
UNUSED_PARAMETER(display_time);
UNUSED_PARAMETER(update_ref);
if (status == kCGDisplayStreamFrameStatusStopped) {
os_event_signal(dc->disp_finished);
@ -251,9 +250,6 @@ void load_crop(struct display_capture *dc, obs_data_t *settings);
static void *display_capture_create(obs_data_t *settings, obs_source_t *source)
{
UNUSED_PARAMETER(source);
UNUSED_PARAMETER(settings);
struct display_capture *dc = bzalloc(sizeof(struct display_capture));
dc->source = source;

View File

@ -451,8 +451,6 @@ static inline void syphon_destroy_internal(syphon_t s);
static void *syphon_create_internal(obs_data_t *settings, obs_source_t *source)
{
UNUSED_PARAMETER(source);
syphon_t s = bzalloc(sizeof(struct syphon));
if (!s)
return s;
@ -1039,8 +1037,6 @@ static inline void tick_inject_state(syphon_t s, float seconds)
static void syphon_video_tick(void *data, float seconds)
{
UNUSED_PARAMETER(seconds);
syphon_t s = data;
if (s->inject_active && !s->inject_server_found)

View File

@ -917,7 +917,6 @@ static void replay_buffer_hotkey(void *data, obs_hotkey_id id,
{
UNUSED_PARAMETER(id);
UNUSED_PARAMETER(hotkey);
UNUSED_PARAMETER(pressed);
if (!pressed)
return;

View File

@ -128,7 +128,6 @@ static obs_properties_t *ffmpeg_source_getproperties(void *data)
struct ffmpeg_source *s = data;
struct dstr filter = {0};
struct dstr path = {0};
UNUSED_PARAMETER(data);
obs_properties_t *props = obs_properties_create();
@ -611,8 +610,6 @@ static void ffmpeg_source_stop_hotkey(void *data, obs_hotkey_id id,
static void *ffmpeg_source_create(obs_data_t *settings, obs_source_t *source)
{
UNUSED_PARAMETER(settings);
struct ffmpeg_source *s = bzalloc(sizeof(struct ffmpeg_source));
s->source = source;

View File

@ -413,7 +413,6 @@ static obs_properties_t *color_grade_filter_properties(void *data)
dstr_free(&filter_str);
dstr_free(&path);
UNUSED_PARAMETER(data);
return props;
}

View File

@ -533,7 +533,6 @@ static obs_properties_t *compressor_properties(void *data)
struct sidechain_prop_info info = {sources, parent};
obs_enum_sources(add_sources, &info);
UNUSED_PARAMETER(data);
return props;
}

View File

@ -775,10 +775,6 @@ static bool obs_qsv_sei(void *data, uint8_t **sei, size_t *size)
if (!obsqsv->context)
return false;
/* (Jim) Unused */
UNUSED_PARAMETER(sei);
UNUSED_PARAMETER(size);
*sei = obsqsv->sei;
*size = obsqsv->sei_size;
return true;

View File

@ -64,8 +64,6 @@ static void luma_wipe_update(void *data, obs_data_t *settings)
bfree(file);
dstr_free(&path);
UNUSED_PARAMETER(settings);
}
static void luma_wipe_get_list(void *data)

View File

@ -48,7 +48,6 @@ static void *swipe_create(obs_data_t *settings, obs_source_t *source)
obs_source_update(source, settings);
UNUSED_PARAMETER(settings);
return swipe;
}

View File

@ -115,8 +115,6 @@ static const char *rtmp_custom_password(void *data)
static void rtmp_custom_apply_settings(void *data, obs_data_t *video_settings,
obs_data_t *audio_settings)
{
UNUSED_PARAMETER(audio_settings);
struct rtmp_custom *service = data;
if (service->server != NULL && video_settings != NULL &&
strncmp(service->server, RTMP_PROTOCOL, strlen(RTMP_PROTOCOL)) !=

View File

@ -446,8 +446,6 @@ static unsigned vlcs_video_format(void **p_data, char *chroma, unsigned *width,
enum video_format new_format;
enum video_range_type range;
bool new_range;
unsigned new_width = 0;
unsigned new_height = 0;
size_t i = 0;
new_format = convert_vlc_video_format(chroma, &new_range);

View File

@ -460,8 +460,6 @@ static void duplicator_capture_tick(void *data, float seconds)
if (!capture->showing)
capture->showing = true;
UNUSED_PARAMETER(seconds);
}
static uint32_t duplicator_capture_width(void *data)

View File

@ -2420,7 +2420,6 @@ static obs_properties_t *game_capture_properties(void *data)
obs_property_list_add_string(p, TEXT_RGBA10A2_SPACE_2100PQ,
RGBA10A2_SPACE_2100PQ);
UNUSED_PARAMETER(data);
return ppts;
}

View File

@ -161,7 +161,6 @@ static inline void *CreateDShowEncoder(obs_data_t *settings,
obs_encoder_get_name(context), error);
}
UNUSED_PARAMETER(settings);
return encoder;
}

View File

@ -1953,7 +1953,6 @@ static bool DeviceIntervalChanged(obs_properties_t *props, obs_property_t *p,
UpdateVideoFormats(device, format, cx, cy, val, props);
UpdateFPS(device, format, val, cx, cy, props);
UNUSED_PARAMETER(p);
return true;
}