[PATCH:libXaw3d 2/2] Make WriteToFile take constified arguments

Alan Coopersmith alan.coopersmith at oracle.com
Wed Sep 7 17:09:36 PDT 2011


Fixes compiler warning:
"AsciiSrc.c", line 858: warning: argument #2 is incompatible with prototype:
	prototype: pointer to char : "AsciiSrc.c", line 118
	argument : pointer to const char

Has to use _XtString (#define char *) instead of String (typedef char *) to
correctly be a pointer to const chars instead of a const pointer to chars.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/AsciiSrc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c
index 7df327d..e490b33 100644
--- a/src/AsciiSrc.c
+++ b/src/AsciiSrc.c
@@ -115,7 +115,7 @@ static void GetValuesHook(Widget, ArgList, Cardinal *);
 static String MyStrncpy(char *, char *, int);
 static String StorePiecesInString(AsciiSrcObject);
 static Boolean SetValues(Widget, Widget, Widget, ArgList, Cardinal *);
-static Boolean WriteToFile(String, String);
+static Boolean WriteToFile(_Xconst _XtString, _Xconst _XtString);
 #ifdef X_NOT_STDC_ENV
 extern int errno;
 #endif
@@ -915,7 +915,7 @@ RemoveOldStringOrFile(AsciiSrcObject src, Boolean checkString)
  */
 
 static Boolean
-WriteToFile(String string, String name)
+WriteToFile(_Xconst _XtString string, _Xconst _XtString name)
 {
   int fd;
 
-- 
1.7.3.2



More information about the xorg-devel mailing list