Repository navigation
Add -Wshadow to the C ratchet (#516) - #616
Merged
Merged
Conversation
Refs #516 Local-Gate: v1 tree=e52dbb36ed65b06dd0268b77e8dd4619beab2541 secs=367 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791922667,"gate":"rust/all/fmt","host":"linux-x86_64","key":"5d16232bff550d185f0cd8d386d210601c64f8f2dc28ac98972023d4be738f9c","lane":"lint","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":19,"stamp":"42d76671af249717f7fb2e5a1cba7957","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"5d16232bff550d185f0cd8d386d210601c64f8f2dc28ac98972023d4be738f9c","lane":"lint","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":19,"stamp":"2c7e481bbf629c614d87fe9b8e065976","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"3e12509f3b5e6ec497aa5f62fb0ddfc1b136cb67c7352a2458541f9bb147d961","lane":"rust-test","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":135,"stamp":"0351d9a73bb290d9c6170d6a90fef3f4","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"53715583882cb462afb28e3c4834124d","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"1715ddcc7f3e34e83486c9f388df787c","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"fe92d03f5f6145a89e3adfc0adffd8bb","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"1ddb87461d0c8ef479f2cfa18df84491","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"02520052c792e843673d0ec9ef82bb29","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"d5eb6c15df59fec2093fb684a65d0f05f957e1d433ee5f904d9cf92ba917e667","lane":"cross","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":66,"stamp":"8d8cd7d7b1d30bd2896a81f007ad7e60","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"} Ci-Attestation: {"at":1791922667,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"138db114dae578ee7c957cbebeca9b6c60723bdffe3b20c85df13fabc3bc4f63","lane":"tier2-linux","parents":["c9ab78930597165e583e8bd2c11795c58584480e"],"secs":147,"stamp":"06d196c112d5e80be2de29ecc64c454c","tree":"e52dbb36ed65b06dd0268b77e8dd4619beab2541","v":1,"via":"run"}
obs-audio.c: push_audio_tree and the mix loop's unlock still named the outer source (uninitialized there; MSVC C4700, Clang -Wuninitialized). rtmp-stream.c: the video loop released the outer settings instead of the encoder's. GCC accepted both because the outer variable exists. Refs #516 Local-Gate: v1 tree=05f95190f8981ca8ba32122ae6f952de36f35c14 secs=373 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791923879,"gate":"rust/all/fmt","host":"linux-x86_64","key":"cd0eb447105bc39b39c1185be6064ade1e2942fa2d026b69b9fc25e05e10c50f","lane":"lint","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":30,"stamp":"d653ae71ef3294cc42b4359a4efd2cf5","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"cd0eb447105bc39b39c1185be6064ade1e2942fa2d026b69b9fc25e05e10c50f","lane":"lint","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":30,"stamp":"64bdaefbcb2fb39c7efb02ec59b3cc0f","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"e2f1f3c834ce970b4cef51f59fd33190622ded26dc62baa4fe0f74a1c54b6d7e","lane":"rust-test","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":119,"stamp":"079ffab48ff5fbe506ad64d060fc4c69","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"4759765f6771ca5b4608422d21e2bc1b","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"3797af5d9cdef9dc0986db5ed0c3af4d","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"576e8d56ca286f760d9e7c351c69a92a","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"bb32277a136bf4ef81af569525b03b62","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"1afc90f7382a6318f02778b7ed083c74","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923879,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"2091ef391551ea781621936d3be19efd604b5b02f0f1af0f74ef109faac85320","lane":"cross","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":97,"stamp":"28acae4a202d02cd287bf383e21a9be9","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"} Ci-Attestation: {"at":1791923880,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"e798fa4fa22b8bbd108b9ef09d589cd844e35d5416e5a23228266d7e05f371a3","lane":"tier2-linux","parents":["08098331cd25495673b80cb6d8eaca3d72c595b8"],"secs":126,"stamp":"1a3773e27bc14702bb5d4172520f25fc","tree":"05f95190f8981ca8ba32122ae6f952de36f35c14","v":1,"via":"run"}
Member
Author
|
Fixed in e45a2b6: two renames left references to the outer variable. GCC accepted them because the outer one exists. MSVC (C4700) and Clang (-Wuninitialized) caught the first.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #516. C only; C++ shadow stays disabled.
RED: -Wno-shadow replaced by -Wshadow in the GCC C and Clang C options (GCC's shared list now keeps -Wno-shadow for CXX only); test/cmocka exempted (GCC/Clang only).
GREEN: 38 sites renamed (libobs, libobs-opengl, linux-capture, linux-pipewire, obs-outputs, vlc-video, happy-eyeballs, obs-scripting lua). Renames only; no public header or API change.
Exemptions (GCC/Clang only): test/cmocka, vendored librtmp, rnnoise.
Caveats: Xcode GCC_WARN_SHADOW is a single non-per-language setting, so left NO (macOS Xcode builds are not covered). Found with the full Linux build; QSV, NVENC, AJA, WebRTC and Windows/macOS-only C files were not compiled, only scanned heuristically (no hits).