[PATCH xf86-video-ati] Reindent code in radeon_dri2_create_buffer2

Michel Dänzer michel at daenzer.net
Wed Nov 9 07:04:54 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

Fixes warning about misleading indentation from recent versions of gcc:

../../src/radeon_dri2.c: In function ‘radeon_dri2_create_buffer2’:
../../src/radeon_dri2.c:224:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO)
  ^~
../../src/radeon_dri2.c:227:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
      if (aligned_width == front_width)
      ^~

No functional change intended.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_dri2.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 1206b2a..8112670 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -224,14 +224,14 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen,
 	if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO)
 	    tiling |= RADEON_TILING_MACRO;
 
-	    if (aligned_width == front_width)
-		aligned_width = pScrn->virtualX;
-
-	    pixmap = (*pScreen->CreatePixmap)(pScreen,
-					      aligned_width,
-					      height,
-					      depth,
-					      flags | RADEON_CREATE_PIXMAP_DRI2);
+	if (aligned_width == front_width)
+	    aligned_width = pScrn->virtualX;
+
+	pixmap = (*pScreen->CreatePixmap)(pScreen,
+					  aligned_width,
+					  height,
+					  depth,
+					  flags | RADEON_CREATE_PIXMAP_DRI2);
     }
 
     buffers = calloc(1, sizeof *buffers);
-- 
2.10.2



More information about the amd-gfx mailing list