From c0795485027baba0b8cff90f6d30fa008265469b Mon Sep 17 00:00:00 2001 From: "Christiano F. Haesbaert" Date: Sat, 30 Nov 2013 17:33:07 +0100 Subject: [PATCH] Fix radeon kms on clang. clang optimizations will consider this undefined behaviour due to uninitiliazed data. Xorg was segfaulting on startup with radeonkms on a HD6770, found out by fixing the clang warnings. --- src/radeon_dri2.c | 2 +- src/radeon_kms.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git src/radeon_dri2.c src/radeon_dri2.c index 79d8f39..4498606 100644 --- src/radeon_dri2.c +++ src/radeon_dri2.c @@ -576,7 +576,7 @@ static void radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata) { DRI2ClientEventsPtr pClientEventsPriv; - DRI2FrameEventPtr ref; + DRI2FrameEventPtr ref = NULL; NewClientInfoRec *clientinfo = calldata; ClientPtr pClient = clientinfo->client; pClientEventsPriv = GetDRI2ClientEvents(pClient); diff --git src/radeon_kms.c src/radeon_kms.c index 44a0139..223d669 100644 --- src/radeon_kms.c +++ src/radeon_kms.c @@ -270,7 +270,7 @@ static void radeon_dirty_update(ScreenPtr screen) { RegionPtr region; - PixmapDirtyUpdatePtr ent; + PixmapDirtyUpdatePtr ent = NULL; if (xorg_list_is_empty(&screen->pixmap_dirty_list)) return; -- 1.8.4.3