[rkward-cvs] SF.net SVN: rkward: [1956] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Thu Sep 13 16:52:43 UTC 2007


Revision: 1956
          http://rkward.svn.sourceforge.net/rkward/?rev=1956&view=rev
Author:   tfry
Date:     2007-09-13 09:52:43 -0700 (Thu, 13 Sep 2007)

Log Message:
-----------
Less warnings

Modified Paths:
--------------
    trunk/rkward/ChangeLog
    trunk/rkward/rkward/rbackend/rembedinternal.cpp
    trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
    trunk/rkward/rkward/rbackend/rkstructuregetter.h

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2007-09-13 15:02:39 UTC (rev 1955)
+++ trunk/rkward/ChangeLog	2007-09-13 16:52:43 UTC (rev 1956)
@@ -1,3 +1,4 @@
+- silence some GCC 4.2 warnings
 - fixed: crash when editing a data.frame with logicals (logicals are still mishandled, but less severe)
 - fixed: would not work with R 2.6
 - more compilation fixes for GCC 4.3

Modified: trunk/rkward/rkward/rbackend/rembedinternal.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rembedinternal.cpp	2007-09-13 15:02:39 UTC (rev 1955)
+++ trunk/rkward/rkward/rbackend/rembedinternal.cpp	2007-09-13 16:52:43 UTC (rev 1956)
@@ -92,6 +92,10 @@
 extern Rboolean (Rf_isNull)(SEXP s);
 extern Rboolean (Rf_isObject)(SEXP s);
 SEXP R_LastvalueSymbol;
+// most chars should be const char *, now
+#	define CONSTCHAR const char
+#else
+#	define CONSTCHAR char
 #endif
 
 #ifdef R_2_4
@@ -312,8 +316,8 @@
 int REditFile (char *buf) {
 	RK_TRACE (RBACKEND);
 
-	char *editor = "none";
-	char *title = "";
+	char *editor = (char *) "none";
+	char *title = (char *) "";
 
 // does not exist in standard R 2.1.0, so no idea what to return.
 	return REditFiles (1, &buf, &title, editor);
@@ -765,7 +769,7 @@
 	PROTECT (exp);
 	/* Do NOT ask me why, but the line below is needed for warnings to be printed, while otherwise they would not be shown.
 	Apparently we need to print at least something in order to achieve this. Whatever really happens in Rprintf () to have such an effect, I did not bother to find out. */
-	Rprintf ("");
+	Rprintf ((char *) "");
 
 	Rf_PrintWarnings ();
 
@@ -833,7 +837,9 @@
 		SEXP parsed = parseCommand (command_qstring, error);
 		if (*error == NoError) runCommandInternalBase (parsed, error);
 	} else {		// run a user command
+#ifndef USE_R_REPLDLLDO1
 		SEXP parsed = parseCommand (command_qstring, error);
+#endif
 		// do not run incomplete commands, but *do* run commands with syntax errors if USE_R_REPLDLLDO1. Why? Because this is the only way to get a syntax error messages, so far.
 		if ((*error != NoError)) {
 			if (*error != SyntaxError) return;

Modified: trunk/rkward/rkward/rbackend/rkstructuregetter.cpp
===================================================================
--- trunk/rkward/rkward/rbackend/rkstructuregetter.cpp	2007-09-13 15:02:39 UTC (rev 1955)
+++ trunk/rkward/rkward/rbackend/rkstructuregetter.cpp	2007-09-13 16:52:43 UTC (rev 1956)
@@ -54,7 +54,7 @@
 	UNPROTECT (num_prefetched_funs + 1); /* all the pre-resolved functions and the meta attribute */
 }
 
-SEXP RKStructureGetter::prefetch_fun (char *name, bool from_base) {
+SEXP RKStructureGetter::prefetch_fun (CONSTCHAR *name, bool from_base) {
 	SEXP ret;
 
 	if (from_base) {

Modified: trunk/rkward/rkward/rbackend/rkstructuregetter.h
===================================================================
--- trunk/rkward/rkward/rbackend/rkstructuregetter.h	2007-09-13 15:02:39 UTC (rev 1955)
+++ trunk/rkward/rkward/rbackend/rkstructuregetter.h	2007-09-13 16:52:43 UTC (rev 1956)
@@ -42,7 +42,7 @@
 	void getStructureSafe (SEXP value, const QString &name, bool misplaced, RData *storage);
 	SEXP resolvePromise (SEXP from);
 
-	SEXP prefetch_fun (char *name, bool from_base=true);
+	SEXP prefetch_fun (CONSTCHAR *name, bool from_base=true);
 
 	bool with_namespace;
 	SEXP namespace_envir;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list