Re: SVN r258549 breaks -current compiled with gcc

2013-11-25 Thread Michael Butler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 11/25/13 09:45, Jean-Sébastien Pédron wrote:
> On 25.11.2013 15:13, Michael Butler wrote:
>> --- drm_linux_list_sort.o ---
>> cc1: warnings being treated as errors
>> /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:
>> In function 'drm_le_cmp':
>> /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:45:
>> warning: cast discards qualifiers from pointer target type
> 
> Hello!
> 
> Can you try the attached patch?
> 
> I got rid of __DECONST() because clang didn't complain, sorry...

That fixed it - thanks! :-)

imb

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (FreeBSD)

iEYEARECAAYFAlKTY7UACgkQQv9rrgRC1JKqEgCgoMTBkjDdNrrA94Jry1lOKB30
Sk4AoKiaOo8ZPyEAxR2FxjAbpbRHpw6v
=fcGs
-END PGP SIGNATURE-
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"


Re: SVN r258549 breaks -current compiled with gcc

2013-11-25 Thread Jean-Sébastien Pédron
On 25.11.2013 15:13, Michael Butler wrote:
> --- drm_linux_list_sort.o ---
> cc1: warnings being treated as errors
> /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:
> In function 'drm_le_cmp':
> /usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:45:
> warning: cast discards qualifiers from pointer target type

Hello!

Can you try the attached patch?

I got rid of __DECONST() because clang didn't complain, sorry...

-- 
Jean-Sébastien Pédron
diff --git a/sys/dev/drm2/drm_linux_list_sort.c b/sys/dev/drm2/drm_linux_list_sort.c
index ae4cd64..19c5c9e 100644
--- a/sys/dev/drm2/drm_linux_list_sort.c
+++ b/sys/dev/drm2/drm_linux_list_sort.c
@@ -42,8 +42,8 @@ drm_le_cmp(void *priv, const void *d1, const void *d2)
 	struct drm_list_sort_thunk *thunk;
 
 	thunk = priv;
-	le1 = *(struct list_head **)d1;
-	le2 = *(struct list_head **)d2;
+	le1 = *(__DECONST(struct list_head **, d1));
+	le2 = *(__DECONST(struct list_head **, d2));
 	return ((thunk->cmp)(thunk->priv, le1, le2));
 }
 


signature.asc
Description: OpenPGP digital signature


SVN r258549 breaks -current compiled with gcc

2013-11-25 Thread Michael Butler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

As follows:

- --- drm_linux_list_sort.o ---
cc1: warnings being treated as errors
/usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:
In function 'drm_le_cmp':
/usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:45:
warning: cast discards qualifiers from pointer target type
/usr/src/sys/modules/drm2/drm2/../../../dev/drm2/drm_linux_list_sort.c:46:
warning: cast discards qualifiers from pointer target type
*** [drm_linux_list_sort.o] Error code 1

imb
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.15 (FreeBSD)

iEYEARECAAYFAlKTWyYACgkQQv9rrgRC1JIv9ACggu06a5cfI2u6zt/45gLW/VU6
/sAAoICTUVfOskh4H0O5uJcVX31ceddX
=qONm
-END PGP SIGNATURE-
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"