diff options
author | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:16 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2023-05-17 18:49:16 +0200 |
commit | 6cff1a49d2b124266f8da41065c471d80cdd32e2 (patch) | |
tree | ff15da38af695c0bb149165db201765e0f4fc050 /src/capture/nvfbc.c | |
parent | 715a3c612a606465ee5526efe53029741ee4c7f9 (diff) |
Fix all warnings
Diffstat (limited to 'src/capture/nvfbc.c')
-rw-r--r-- | src/capture/nvfbc.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |