HomeFreeBSD

MFC r334946:

Description

MFC r334946:

Fix build of i915kms with base gcc

Base gcc fails to compile sys/dev/drm2/i915/intel_display.c for i386,
with the following -Werror warnings:

cc1: warnings being treated as errors
/usr/src/sys/dev/drm2/i915/intel_display.c:8884: warning:
initialization from incompatible pointer type

This is due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36432, which
incorrectly interprets the [] as a flexible array member.

Because base gcc does not have a -W flag to suppress this particular
warning, it requires a rather ugly cast. To not influence any other
compiler, put it in a #if/#endif block.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D15744

Details

Provenance
dimAuthored on
Reviewer
kib
Differential Revision
D15744: Fix build of i915kms with base gcc
Parents
rS335287: praudit(1): return 0 on success
Branches
Unknown
Tags
Unknown