Commit b35a4c2
committed
cocoa_common: drop dead ui_window_cocoa_t stack declaration
-[CocoaView init] at cocoa_common.m:254 had an #if defined(HAVE_COCOA)
block that declared a stack-local ui_window_cocoa_t, assigned its
.data field to self, then let the variable go out of scope without
passing, storing, or otherwise referencing it. Pure dead code.
Confirmed unused: ui_window_cocoa_t is the payload type for the
ui_window_cocoa_* driver vtable in ui_cocoa.m, but that vtable's
init function returns NULL, so the other entry points never see
a valid ui_window_cocoa_t anyway - unrelated pre-existing plumbing
issue with the ui_window driver system, not something this commit
addresses.
Removing the block also lets the two surrounding #if defined(OSX)
blocks merge into one, eliminating one preprocessor conditional.
Zero runtime change; the generated code for -[CocoaView init] is
identical modulo the unused stack slot.
Caught during a HAVE_COCOA_METAL vs HAVE_COCOA convergence sweep
(following 492b9c4) - one of the few remaining HAVE_COCOA-only
branches turned out to be dead code rather than a real platform
divergence.1 parent 492b9c4 commit b35a4c2
1 file changed
Lines changed: 3 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 252 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
263 | 256 | | |
264 | 257 | | |
265 | 258 | | |
| |||
0 commit comments