Repository navigation
build: state the macOS conversion sites the mac lanes stop on (#2950) - #2951
Conversation
|
Round 4 is in ( The dispatch on it (40936503160) got past those, but the next class is not in this tree: all three macOS jobs now fail on six Reproduced outside this PR on the same Qt version with a two-line TU: So I stopped casting here instead of guessing: the branch is draft, the four commits above are the honest source-side fixes, and this needs a maintainer call. Refs #2950. |
|
Routed the open question to #2950 as a recognised This PR stays draft and unchanged until that answer. The four commits on it are the honest source-side half. Refs #2950 |
The conversion ratchet's macOS lanes reported the next files after the qt-host and obs-outputs sites were stated: - frontend/utility/platform-osx.mm.hpp:238 `float iconSize = 0.45` narrows a double literal; 239 passes `size.width`/`size.height` (CGFloat, double) to `QIcon::pixmap(int, int)`; 768 computes `height * 0.8` in double and returns it as float. - shared/properties-view/properties-view.cpp.hpp:1872 passes `data.value<double>()` to `obs_data_set_bool`, an implicit double to bool. Every site states the conversion in place, the shape the earlier ratchet fixes use, with no flag, pin or target change. The label height keeps its double arithmetic and narrows once (`static_cast<float>(height * 0.8)`), so the value is bit-identical to before; `ci/test_dialog_platform_facade` compares that float's bytes and caught the first, float-arithmetic version. The combo bool keeps its nonzero-is-true meaning. Refs #2950
The first macOS analyze run of this branch (40927604102, job 123637185221) cleared `platform-osx.mm.hpp` and reached the next file: three `resize(bufferSize)` calls in `PluginModuleLoader_MacOS.mm.hpp` (128, 160, 172) narrow the `int` returned by `os_get_config_path` / `os_get_program_data_path` to `std::string::size_type` (`-Wsign-conversion`). Each call is already guarded by `bufferSize > 0`, so the stated cast cannot underflow; no flag, pin or target change. Refs #2950
…2950) The ratchet's next class after qt-host-macos: the update helpers narrow a vsnprintf length to std::string::size_type, and WhatsNewInfoThread crosses std::streamsize/streamoff against size_t at five call sites (a QByteArray signature length included). Each is a static_cast stating the conversion, with the values already bounded by the stream and buffer guards.
e54bf80 to
39b9269
Compare
|
Rebased onto Why: the Local: Refs #2950 |
|
Handed off to the coordinator.
|
RED
Master's macOS lanes on
c2df54a7f(scheduled.yamldispatch, run 40920717013, on top of #2947):Analyze 🔬 / macOS 🍏 (clang-analyze)job 123612882619 —frontend/utility/platform-osx.mm.hpp:238,239,768:implicit conversion loses floating-point precision: 'double' to 'float'andimplicit conversion turns floating-point number into integer: 'CGFloat' (double) to 'int'.Build 🧱 / macOS 🍏 (x86_64)job 123615941678 —shared/properties-view/properties-view.cpp.hpp:1872:implicit conversion turns floating-point number into integer: 'double' to 'bool'.What changed
Each site states its conversion in place, the shape the ratchet's earlier fixes use; no flag, pin or target change.
platform-osx.mm.hpp:2380.45→0.45fplatform-osx.mm.hpp:239static_cast<int>(size.width/height)forQIcon::pixmap(int, int)platform-osx.mm.hpp:768static_cast<float>(height * 0.8)properties-view.cpp.hpp:1872data.value<double>() != 0.0PluginModuleLoader_MacOS.mm.hpp:128,160,172resize(static_cast<std::string::size_type>(bufferSize))shared/qt/platform/qt-host-macos.cpp.hpp:43return static_cast<uint32_t>(obsModifiers)(the posix sibling's shape)update-helpers.cpp.hpp:15,16str.resize(static_cast<size_t>(size)),vsnprintf(…, static_cast<size_t>(size), …)WhatsNewInfoThread.cpp.hpp:33,53,57write(…, static_cast<std::streamsize>(data.size())),size_t size = static_cast<size_t>(fileStream.tellg()),read(…, static_cast<std::streamsize>(size))WhatsNewInfoThread.cpp.hpp:86,177size_t read = static_cast<size_t>(file.gcount()),static_cast<size_t>(signature.size())Value semantics are unchanged: the label height keeps its double arithmetic and narrows once, so the returned float is bit-identical (
ci/test_dialog_platform_facadecompares its bytes, and the first float-arithmetic version failed that test); the combo bool keeps nonzero-is-true; eachresizeis already guarded bybufferSize > 0.GREEN evidence
The same
scheduled.yamldispatch on this branch, three macOS jobs (clang-analyze, build arm64, build x86_64) past every file above.Rounds so far, each one clearing the file it reached and reporting the next:
platform-osx.mm.hpp, reported onlyPluginModuleLoader_MacOS.mm.hpp's three sign conversions (commit 2).qt-host-macos.cpp.hpp:43(commit 3).07e72dfcb— all three macOS jobs passedqt-host-macos.cpp.hppand stopped atupdate-helpers.cpp.hpp:15,16plus the fiveWhatsNewInfoThread.cpp.hppsites (commit 4,e54bf8092).e54bf8092— the three macOS jobs passed every file in this PR and then stopped inside the universal Qt 6.11 deps' own headers (qnamespace.h:1926,1930,1935,qversiontagging.h:80), which no call-site cast here can state. The PR stays a draft; see the comment below on the build-system decision that class needs.Local:
./lintok,uv run ci/test_dialog_platform_facade.pyok.Tiers that do not apply: no Rust unit, C test, protocol or runtime behaviour change.
Refs #2950