Kaynağa Gözat

libobs: Explicitly mark variables as unused

PatTheMav 3 yıl önce
ebeveyn
işleme
ff7f756886
3 değiştirilmiş dosya ile 6 ekleme ve 8 silme
  1. 1 1
      libobs/graphics/graphics-ffmpeg.c
  2. 4 6
      libobs/obs-scene.c
  3. 1 1
      libobs/obs-video.c

+ 1 - 1
libobs/graphics/graphics-ffmpeg.c

@@ -152,7 +152,7 @@ static void *ffmpeg_image_copy_data_straight(struct ffmpeg_image *info,
 	return data;
 }
 
-static inline size_t get_dst_position(size_t src, const size_t w,
+static inline size_t get_dst_position(size_t src OBS_UNUSED, const size_t w,
 				      const size_t h, const size_t x,
 				      const size_t y, int orient)
 {

+ 4 - 6
libobs/obs-scene.c

@@ -1499,12 +1499,10 @@ static bool scene_audio_render(void *data, uint64_t *ts_out,
 	return true;
 }
 
-enum gs_color_space
-scene_video_get_color_space(void *data, size_t count,
-			    const enum gs_color_space *preferred_spaces)
+enum gs_color_space scene_video_get_color_space(
+	void *data OBS_UNUSED, size_t count OBS_UNUSED,
+	const enum gs_color_space *preferred_spaces OBS_UNUSED)
 {
-	UNUSED_PARAMETER(data);
-
 	enum gs_color_space space = GS_CS_SRGB;
 	struct obs_video_info ovi;
 	if (obs_get_video_info(&ovi)) {
@@ -2062,7 +2060,7 @@ static inline bool source_has_audio(obs_source_t *source)
 static obs_sceneitem_t *obs_scene_add_internal(obs_scene_t *scene,
 					       obs_source_t *source,
 					       obs_sceneitem_t *insert_after,
-					       bool create_texture)
+					       bool create_texture OBS_UNUSED)
 {
 	struct obs_scene_item *last;
 	struct obs_scene_item *item;

+ 1 - 1
libobs/obs-video.c

@@ -599,7 +599,7 @@ static const uint8_t *set_gpu_converted_plane(uint32_t width, uint32_t height,
 	return in;
 }
 
-static void set_gpu_converted_data(struct obs_core_video *video,
+static void set_gpu_converted_data(struct obs_core_video *video OBS_UNUSED,
 				   struct video_frame *output,
 				   const struct video_data *input,
 				   const struct video_output_info *info)