tytan652

Results 341 comments of tytan652

Changed some CMake conditions to apply Clang/GCC flags with `NOT MSVC` rather than `NOT OS_WINDOWS` or `OS_POSIX` or even `UNIX` for jansson.

Since between some generators there is different enablement (e.g [here between Ninja and Xcode](https://github.com/obsproject/obs-studio/pull/6761#discussion_r924326213)) I ensured that null conversion warning on Clang and GCC is enabled.

#6060 added a new shadow-ivar warning. ``` /Users/runner/work/obs-studio/obs-studio/obs-studio/UI/platform-osx.mm:215:15: error: local declaration of 'icon' hides instance variable [-Werror,-Wshadow-ivar] self->icon = icon; ^ 1 error generated. ninja: build stopped: subcommand failed. +...

> Yeah needs to be fixed in code, ObjC convention is to prefix private variables with an underscore Updated the change with this convention in mind.

#6792 and #6809 added unused parameter warnings. Edit: Added `-Wunused-parameter` to `CompilerConfig.cmake` because it seems not to be enabled by default on Ubuntu.

#6802 added incompatible-pointer-types warnings. ``` /obs-studio/plugins/rtmp-services/rtmp-common.c:863:31: error: returning ‘char **’ from a function with incompatible return type ‘const char **’ [-Werror=incompatible-pointer-types] 863 | return service->video_codecs; | ~~~~~~~^~~~~~~~~~~~~~ /obs-studio/plugins/rtmp-services/rtmp-common.c:898:23: error: returning...

Discovered that Xcode 14 deprecates sprintf(), so I placed pragmas to turn related errors back to warnings.

Waiting for a PR that replace sprintf() which is deprecated on macOS with Xcode 14.

Try to build on Linux with Clang and found that `-Wswitch` was not enabled on GCC by default, so I added it and fix the resulting warnings.

#6134 added warnings: - format warnings - incompatible-pointer-types warning - unused-parameter warnings Note: ftime() is deprecated with newer glibc (I did not fix them), this will may need to be...