This message is *very* noisy and totally dominates +win (e.g. it printed 1.5 million times in a relatively short log of a Steam session). Is it useful? If so, perhaps we could log only around the error conditions?
-- v2: win32u: Remove a log message in get_shared_window. win32u: Fix an uninitialized variable warning.
From: Tim Clem tclem@codeweavers.com
Effectively a false positive, since we only use window_shm if get_shared_window succeeds, but the compiler doesn't know that. --- dlls/win32u/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 4a9e817c7e4..38af589a0a8 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -993,7 +993,7 @@ BOOL is_window_enabled( HWND hwnd ) UINT get_window_dpi_awareness_context( HWND hwnd ) { struct object_lock lock = OBJECT_LOCK_INIT; - const window_shm_t *window_shm; + const window_shm_t *window_shm = NULL; UINT status, ctx = 0;
while ((status = get_shared_window( hwnd, &lock, &window_shm )) == STATUS_PENDING)
From: Tim Clem tclem@codeweavers.com
--- dlls/win32u/window.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/dlls/win32u/window.c b/dlls/win32u/window.c index 38af589a0a8..62d6ace72a5 100644 --- a/dlls/win32u/window.c +++ b/dlls/win32u/window.c @@ -129,8 +129,6 @@ static NTSTATUS get_shared_window( HANDLE handle, struct object_lock *lock, cons const shared_object_t *object; struct user_entry entry;
- TRACE( "handle %p, lock %p, window_shm %p\n", handle, lock, window_shm ); - if (!get_user_entry( handle, NTUSER_OBJ_WINDOW, &entry, &handle )) return STATUS_INVALID_HANDLE;
if (lock->id) object = CONTAINING_RECORD( *window_shm, shared_object_t, shm.window );
On Wed Aug 13 17:36:40 2025 +0000, Rémi Bernon wrote:
The warning will need to be fixed even though I think it's a false positive (just needs an initialization).
Oh strange, I wouldn't have expected the log change to expose that. Added another commit for that in v2.
This merge request was approved by Rémi Bernon.