string literal assigned to char*
--------------------------------

                 Key: XERCESC-1872
                 URL: https://issues.apache.org/jira/browse/XERCESC-1872
             Project: Xerces-C++
          Issue Type: Bug
          Components: Utilities
    Affects Versions: 3.0.1
            Reporter: Jonathan Wakely
            Priority: Minor


GCC warns:

xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp: In constructor 
'xercesc_3_0::IconvGNUTransService::IconvGNUTransService(xercesc_3_0::MemoryManager*)':
xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:410: warning: 
deprecated conversion from string constant to 'char*'
xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp:414: warning: 
deprecated conversion from string constant to 'char*'

fixed by this patch

--- 
3.0.1/xerces-c-3.0.1/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp
 2008-07-15 17:29:19.000000000 +0100
+++ 
xerces-c-3.0.1/src/xercesc/util/Transcoders/IconvGNU/IconvGNUTransService.cpp   
    2009-06-08 13:40:52.086404321 +0100
@@ -392,7 +392,7 @@
     // Using an empty string instead of NULL, will modify the libc
     // behavior.
     //
-    char* fLocalCP = setlocale (LC_CTYPE, NULL);
+    const char* fLocalCP = setlocale (LC_CTYPE, NULL);
     if (fLocalCP == NULL || *fLocalCP == 0 ||
         strcmp (fLocalCP, "C") == 0 ||
         strcmp (fLocalCP, "POSIX") == 0) {


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to