[igt-dev] [PATCH i-g-t] lib/igt_halffloat: fix compilation with Clang

Ser, Simon simon.ser at intel.com
Thu Apr 25 11:28:04 UTC 2019


On Thu, 2019-04-25 at 09:36 +0200, Daniel Vetter wrote:
> On Wed, Apr 24, 2019 at 10:06:41PM +0200, Daniel Vetter wrote:
> > On Wed, Apr 24, 2019 at 04:26:55PM +0300, Petri Latvala wrote:
> > > On Wed, Apr 24, 2019 at 12:28:42PM +0300, Petri Latvala wrote:
> > > > On Wed, Apr 24, 2019 at 10:01:29AM +0300, Simon Ser wrote:
> > > > > The source file contains a special code-path for Clang,
> > > > > however this path fails
> > > > > to compile:
> > > > > 
> > > > >   ../lib/igt_halffloat.c:227:7: error: conflicting types for
> > > > > 'igt_half_to_float'
> > > > >   float igt_half_to_float(const uint16_t *h, float *f,
> > > > > unsigned int num)
> > > > >         ^
> > > > >   ../lib/igt_halffloat.h:26:6: note: previous declaration is
> > > > > here
> > > > >   void igt_half_to_float(const uint16_t *h, float *f,
> > > > > unsigned int num);
> > > > >        ^
> > > > >   1 error generated.
> > > > > 
> > > > > This commit fixes this mismatch.
> > > > > 
> > > > > Signed-off-by: Simon Ser <simon.ser at intel.com>
> > > > 
> > > > Same clang path is also used for !x86_64, as shown in the
> > > > gitlab CI
> > > > build failure.
> > > > 
> > > > 
> > > > Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> > > 
> > > And merged now, thanks.
> > 
> > For next time for regressions: Please cc the folks who broke things
> > (or
> > reviewed that breakage), and quote the offending commit with Fixes:
> > lines.

Indeed that would be better, ACK.

> > Also I'm kinda wondering whether we should enforce gitlab CI build
> > success
> > going forward ... Stuff not compiling isn't awesome.
> 
> btw one more: What broke is the non-x86 builds, those we care about.
> We
> don't really care about clang (I think at least), so commit message
> is a
> bit confusing ...

(Just re-posting it here in case someone reads this thread and not the
other one: I sent this patch because I use Clang and it broke on my
system, not because it broke CI, hence the commit message)


More information about the igt-dev mailing list