[Mesa-dev] [PATCH] gallium: fix clang warnings

Kollarova, Martina martina.kollarova at intel.com
Wed Sep 7 14:33:00 UTC 2016


On Wed, 2016-09-07 at 07:38 +0000, Michel Dänzer wrote:
> On 07/09/16 12:29 AM, Nicolai Hähnle wrote:
> > On 06.09.2016 16:37, Martina Kollarova wrote:
> >> 1. Variable 'hole' is uninitialized when used here [-Wuninitialized]
> >> 2. Comparison of constant -1 with expression of type 'unsigned int' is
> >> always
> >>    false [-Wtautological-constant-out-of-range-compare]
> >> ---
> >>  src/gallium/winsys/radeon/drm/radeon_drm_bo.c     | 2 +-
> >>  src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 5 -----
> 
> BTW, please split this up into one patch per component next time.

I'll split them up now since there is still an ongoing discussion on
what to do with the first part. Closing this one.

> 
> 
> >> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> >> b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> >> index 56aab48..23ee8d5 100644
> >> --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> >> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> >> @@ -200,7 +200,7 @@ static uint64_t radeon_bomgr_find_va(struct
> >> radeon_drm_winsys *rws,
> >>  static void radeon_bomgr_free_va(struct radeon_drm_winsys *rws,
> >>                                   uint64_t va, uint64_t size)
> >>  {
> >> -    struct radeon_bo_va_hole *hole;
> >> +    struct radeon_bo_va_hole *hole = NULL;
> > 
> > This is a false positive, [...]
> 
> That's debatable, but anyway it's probably better addressed by porting
> https://cgit.freedesktop.org/mesa/drm/commit/?id=b214b05ccd433c484a6a65e491a1a51b19e4811d
> to src/util/list.h .
> 
> 



More information about the mesa-dev mailing list