[patch] [gui] warning patrol no 2 gtk-peer stuff

Mark Wielaard mark@klomp.org
Thu Oct 21 21:10:00 GMT 2004


Hi,

On Thu, 2004-10-21 at 22:19, Andreas Tobler wrote:
> --- jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c	11 Dec 2003 13:50:51 -0000	1.3
> +++ jni/gtk-peer/gnu_java_awt_peer_gtk_GtkClipboard.c	21 Oct 2004 20:14:32 -0000
> @@ -149,7 +149,7 @@
>    utf = (*gdk_env)->GetStringUTFChars (gdk_env, jstr, NULL);
>  
>    gtk_selection_data_set (selection_data, GDK_TARGET_STRING, 8, 
> -			  (char *)utf, utflen);
> +			  (unsigned char*)utf, utflen);

You are casting away a const here while GetStringUTFChars returns a
const char * and gtk_selection_data_set takes a const uchar *.
 
Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20041021/fb686299/attachment.sig>


More information about the Java-patches mailing list