[Mesa-dev] [PATCH] gallium: fix clang warnings
Michel Dänzer
michel at daenzer.net
Wed Sep 7 07:38:36 UTC 2016
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.
>> 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 .
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list