This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] java/jcf-parse.c: warning removal


1009/gcc/java/jcf-parse.c:783: warning: assignment discards qualifiers from pointer target type

gcc/java/jcf-parse.c:782:  if (current_encoding == NULL || *current_encoding == '\0')
gcc/java/jcf-parse.c:783:    current_encoding = DEFAULT_ENCODING;

gcc/java/lex.h:43:#define DEFAULT_ENCODING "UTF-8"

2000-10-11  Rodney Brown  <RodneyBrown@mynd.com>

	* java-tree.h: Constify current_encoding.
	* lang.c: Constify current_encoding.

--- gcc/java/java-tree.h.orig	Wed Oct 11 15:19:44 2000
+++ gcc/java/java-tree.h	Wed Oct 11 15:19:18 2000
@@ -173,7 +173,7 @@
 extern int flag_hash_synchronization;
 
 /* Encoding used for source files.  */
-extern char *current_encoding;
+extern const char *current_encoding;
 
 /* The Java .class file that provides main_class;  the main input file. */
 extern struct JCF *current_jcf;
--- gcc/java/lang.c.orig	Tue Sep 26 14:14:15 2000
+++ gcc/java/lang.c	Wed Oct 11 15:20:26 2000
@@ -123,7 +123,7 @@
 int flag_jni = 0;
 
 /* The encoding of the source file.  */
-char *current_encoding = NULL;
+const char *current_encoding = NULL;
 
 /* When non zero, report the now deprecated empty statements.  */
 int flag_extraneous_semicolon;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]