[igt-dev] [PATCH i-g-t] Fixup clang compiler warnings.

Petri Latvala petri.latvala at intel.com
Mon May 31 12:26:01 UTC 2021


On Mon, May 31, 2021 at 02:18:24PM +0200, Maarten Lankhorst wrote:
> Op 31-05-2021 om 13:17 schreef Petri Latvala:
> > On Mon, May 31, 2021 at 12:51:38PM +0200, Maarten Lankhorst wrote:
> >> Allows building cleanly with clang again. It complains about using
> >> invalid initialisers like char[][] = { 0 }.
> >>
> >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> >> ---
> >>  lib/igt_kms.c               | 2 +-
> >>  lib/igt_nouveau.c           | 2 +-
> >>  tests/i915/gem_exec_fence.c | 4 ++--
> >>  3 files changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> >> index 28fb9c094eb2..fb7a14f940ea 100644
> >> --- a/lib/igt_kms.c
> >> +++ b/lib/igt_kms.c
> >> @@ -292,7 +292,7 @@ struct edid **igt_kms_get_tiled_edid(uint8_t htile, uint8_t vtile)
> >>  {
> >>  	uint8_t top[2];
> >>  	int edids, i;
> >> -	static  char raw_edid[MAX_EDID][256] = {0};
> >> +	static  char raw_edid[MAX_EDID][256] = {{0}};
> > Can't this be {} ?
> >
> >
> If you make this a r-b. Sure!
> 

If clang (and gcc of course) likes it,
Reviewed-by: Petri Latvala <petri.latvala at intel.com>


More information about the igt-dev mailing list