intel: move declarations to top in drm_intel_gem_bo_unreference()
Fixes the following warning: [65/74] Compiling C object intel/libdrm_intel.so.1.0.0.p/intel_bufmgr_gem.c.o ../intel/intel_bufmgr_gem.c: In function âdrm_intel_gem_bo_unreferenceâ: ../intel/intel_bufmgr_gem.c:1388:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 1388 | drm_intel_bufmgr_gem *bufmgr_gem = | ^~~~~~~~~~~~~~~~~~~~ Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Eric Engestrom <eric@engestrom.ch>main
parent
e0df5fce89
commit
2df9cc28c0
|
@ -1,7 +1,7 @@
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
*
|
*
|
||||||
* Copyright © 2007 Red Hat Inc.
|
* Copyright © 2007 Red Hat Inc.
|
||||||
* Copyright © 2007-2012 Intel Corporation
|
* Copyright © 2007-2012 Intel Corporation
|
||||||
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
|
* Copyright 2006 Tungsten Graphics, Inc., Bismarck, ND., USA
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*
|
*
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
/*
|
/*
|
||||||
* Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
|
* Authors: Thomas Hellström <thomas-at-tungstengraphics-dot-com>
|
||||||
* Keith Whitwell <keithw-at-tungstengraphics-dot-com>
|
* Keith Whitwell <keithw-at-tungstengraphics-dot-com>
|
||||||
* Eric Anholt <eric@anholt.net>
|
* Eric Anholt <eric@anholt.net>
|
||||||
* Dave Airlie <airlied@linux.ie>
|
* Dave Airlie <airlied@linux.ie>
|
||||||
|
@ -1379,15 +1379,15 @@ static void drm_intel_gem_bo_unreference_locked_timed(drm_intel_bo *bo,
|
||||||
static void drm_intel_gem_bo_unreference(drm_intel_bo *bo)
|
static void drm_intel_gem_bo_unreference(drm_intel_bo *bo)
|
||||||
{
|
{
|
||||||
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
|
drm_intel_bo_gem *bo_gem = (drm_intel_bo_gem *) bo;
|
||||||
|
drm_intel_bufmgr_gem *bufmgr_gem;
|
||||||
|
struct timespec time;
|
||||||
|
|
||||||
assert(atomic_read(&bo_gem->refcount) > 0);
|
assert(atomic_read(&bo_gem->refcount) > 0);
|
||||||
|
|
||||||
if (atomic_add_unless(&bo_gem->refcount, -1, 1))
|
if (atomic_add_unless(&bo_gem->refcount, -1, 1))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
drm_intel_bufmgr_gem *bufmgr_gem =
|
bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr;
|
||||||
(drm_intel_bufmgr_gem *) bo->bufmgr;
|
|
||||||
struct timespec time;
|
|
||||||
|
|
||||||
clock_gettime(CLOCK_MONOTONIC, &time);
|
clock_gettime(CLOCK_MONOTONIC, &time);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue