Created attachment 205757 [details]
With powerpc64 switching to clang in head, I tried to compile drm-legacy with clang.
It fails with many similar errors:
/tmp/usr/ports/graphics/drm-legacy-kmod/work/drm-legacy-990f64b/src/dev/drm2/drm_crtc.c:229:63: error: passing 'int *' to parameter of type 'uint32_t *' (aka 'unsigned int *')
converts between pointers to integer types with different sign [-Werror,-Wpointer-sign]
ret = drm_gem_name_create(&dev->mode_config.crtc_names, obj, &new_id);
Add -Wno-error=pointer-sign to CFLAGS when using new clang.
I have no problem with this change, but is it needed always when running clang, or just on powerpc64? (I can't recall I've seen the issue with the base compiler on any FreeBSD version on amd64 or i386, although it certainly seems it should exist there as well).
As a side note, I wonder if explicit casts should be used instead, it's out of scope for this though.
Does drm-legacy-kmod work on powerpc(64)?
(In reply to Piotr Kubaj from comment #0)
> Add -Wno-error=pointer-sign to CFLAGS when using new clang.
Already passed if WARNS is defined since base r169723.
$ make -V CWARNFLAGS:M\*pointer-sign\* -C $(make -V WRKSRC)/drm2/drm2