diff options
Diffstat (limited to 'src/capture')
-rw-r--r-- | src/capture/kms_vaapi.c | 2 | ||||
-rw-r--r-- | src/capture/nvfbc.c | 6 | ||||
-rw-r--r-- | src/capture/xcomposite_cuda.c | 1 | ||||
-rw-r--r-- | src/capture/xcomposite_vaapi.c | 1 |
4 files changed, 7 insertions, 3 deletions
diff --git a/src/capture/kms_vaapi.c b/src/capture/kms_vaapi.c index 765da68..16c746c 100644 --- a/src/capture/kms_vaapi.c +++ b/src/capture/kms_vaapi.c @@ -135,6 +135,7 @@ static bool properties_has_atom(Atom *props, int nprop, Atom atom) { } static void monitor_callback(const XRROutputInfo *output_info, const XRRCrtcInfo *crt_info, const XRRModeInfo *mode_info, void *userdata) { + (void)mode_info; MonitorCallbackUserdata *monitor_callback_userdata = userdata; ++monitor_callback_userdata->num_monitors; @@ -436,6 +437,7 @@ static gsr_kms_response_fd* find_largest_drm(gsr_kms_response *kms_response) { } static int gsr_capture_kms_vaapi_capture(gsr_capture *cap, AVFrame *frame) { + (void)frame; gsr_capture_kms_vaapi *cap_kms = cap->priv; for(int i = 0; i < cap_kms->kms_response.num_fds; ++i) { diff --git a/src/capture/nvfbc.c b/src/capture/nvfbc.c index c45712d..32b83fc 100644 --- a/src/capture/nvfbc.c +++ b/src/capture/nvfbc.c @@ -95,6 +95,10 @@ static bool version_less_than(int major, int minor, int expected_major, int expe return major < expected_major || (major == expected_major && minor < expected_minor); } +static void set_func_ptr(void **dst, void *src) { + *dst = src; +} + static bool gsr_capture_nvfbc_load_library(gsr_capture *cap) { gsr_capture_nvfbc *cap_nvfbc = cap->priv; @@ -105,7 +109,7 @@ static bool gsr_capture_nvfbc_load_library(gsr_capture *cap) { return false; } - cap_nvfbc->nv_fbc_create_instance = (PNVFBCCREATEINSTANCE)dlsym(lib, "NvFBCCreateInstance"); + set_func_ptr((void**)&cap_nvfbc->nv_fbc_create_instance, dlsym(lib, "NvFBCCreateInstance")); if(!cap_nvfbc->nv_fbc_create_instance) { fprintf(stderr, "gsr error: unable to resolve symbol 'NvFBCCreateInstance'\n"); dlclose(lib); diff --git a/src/capture/xcomposite_cuda.c b/src/capture/xcomposite_cuda.c index f40f9d2..d6fc10b 100644 --- a/src/capture/xcomposite_cuda.c +++ b/src/capture/xcomposite_cuda.c @@ -477,7 +477,6 @@ static int gsr_capture_xcomposite_cuda_capture(gsr_capture *cap, AVFrame *frame) } static void gsr_capture_xcomposite_cuda_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) { - gsr_capture_xcomposite_cuda *cap_xcomp = cap->priv; if(cap->priv) { gsr_capture_xcomposite_cuda_stop(cap, video_codec_context); free(cap->priv); diff --git a/src/capture/xcomposite_vaapi.c b/src/capture/xcomposite_vaapi.c index 5a39820..bb92f7f 100644 --- a/src/capture/xcomposite_vaapi.c +++ b/src/capture/xcomposite_vaapi.c @@ -606,7 +606,6 @@ static void gsr_capture_xcomposite_vaapi_stop(gsr_capture *cap, AVCodecContext * static void gsr_capture_xcomposite_vaapi_destroy(gsr_capture *cap, AVCodecContext *video_codec_context) { (void)video_codec_context; - gsr_capture_xcomposite_vaapi *cap_xcomp = cap->priv; if(cap->priv) { gsr_capture_xcomposite_vaapi_stop(cap, video_codec_context); free(cap->priv); |