i-rinat / libvdpau-va-gl

VDPAU driver with OpenGL/VAAPI backend
MIT License
161 stars 26 forks source link

cppcheck errors #56

Closed brunogm0 closed 8 years ago

brunogm0 commented 8 years ago

hi latest cppcheck reported:

[libvdpau-va-gl/glsl/shader-bundle-tool.c:88]: (error) Resource leak: fp_c
[libvdpau-va-gl/tests/test-006.c:37]: (error) Signed integer overflow for expression '4278190080+(k&16777215)'.

[libvdpau-va-gl/src/x-display-ref.hh:35]: (style) Class 'XDisplayRef' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/glx-context.hh:44]: (style) Class 'GLXManagedContext' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:129]: (style) Class 'RBSPState' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:45]: (style) Class 'error' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/bitstream.hh:55]: (style) Class 'ByteReader' has a constructor with 1 argument that is not explicit.
[libvdpau-va-gl/src/api-video-surface.cc:47]: (warning) Member variable 'Resource::rt_idx' is not initialized in the constructor.
[libvdpau-va-gl/tests/conv-speed.c:23]: (style) Unused variable: get_proc_address
[libvdpau-va-gl/tests/test-006.c:37]: (style) Variable 'buf' is assigned a value that is never used.
[libvdpau-va-gl/src/trace.cc:33]: (style) The function 'traceInfo' is never used.
[libvdpau-va-gl/src/entry.cc:98]: (style) The function 'vdp_imp_device_create_x11' is never used.
[libvdpau-va-gl/src/api-video-surface.cc:309]: (style) The function 'video_surface_ensure_allocated' is never used.
i-rinat commented 8 years ago

Thanks for the report. I'll take a look.

i-rinat commented 8 years ago

Addressed in 956c5839039ba77a23c2b7b701106fd682dee6aa...9dca3ffe68e5149074014abd692b4a67e11f1148.

i-rinat commented 8 years ago

Warning about unused vdp_imp_device_create_x11 is still there. It is the entry point for a VDPAU driver, and is not used inside driver, but is required.