On 05.03.2013 13:30, Glen Barber wrote:
> dev/drm2/ttm/ttm_lock.h:208: warning: redundant redeclaration of 
> 'ttm_write_unlock' [-Wredundant-decls]
> dev/drm2/ttm/ttm_lock.h:134: warning: previous declaration of 
> 'ttm_write_unlock' was here
> dev/drm2/ttm/ttm_lock.h:220: warning: redundant redeclaration of 
> 'ttm_write_lock' [-Wredundant-decls]
> dev/drm2/ttm/ttm_lock.h:146: warning: previous declaration of 
> 'ttm_write_lock' was here

Those redundant declarations weren't spotted by clang.

Konstantin, would you like me to commit the fix for this? And we need to
upstream it too.

> dev/drm2/ttm/ttm_page_alloc.c:122: warning: declaration does not declare 
> anything
> dev/drm2/ttm/ttm_page_alloc.c:123: warning: declaration does not declare 
> anything

These errors and the following are caused by unnamed structs and unions
inside another struct:

struct ttm_pool_manager {
        ...

        union {
                struct ttm_page_pool    pools[NUM_POOLS];
                struct {
                        ...
                } ;
        };
};

With default options, clang accepts this but apparently, not gcc.

I would like an opinion from the toolchain gurus, because I don't know
what's the proper way to fix this one.

J.R. Oldroyd CC'd, because he started to work on radeonkms backport to 9
and faced exactly those issues.

-- 
Jean-Sébastien Pédron

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to