octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more gcc 4.3 warnings


From: John W. Eaton
Subject: more gcc 4.3 warnings
Date: Tue, 3 Apr 2007 23:24:38 -0400

I made the following changes to avoid warnings like this from gcc 4.3:

  src/DLD-FUNCTIONS/__glpk__.cc:260: warning: deprecated conversion from string 
constant to 'char*'

I'd rather avoid ugliness like this, so would someone like to work on
making the glpk headers and functions const friendly and getting
the necessary changes accepted upstream?

Thanks,

jwe

Index: src/DLD-FUNCTIONS/__glpk__.cc
===================================================================
RCS file: /cvs/octave/src/DLD-FUNCTIONS/__glpk__.cc,v
retrieving revision 1.21
diff -u -u -r1.21 __glpk__.cc
--- src/DLD-FUNCTIONS/__glpk__.cc       29 Mar 2007 12:49:52 -0000      1.21
+++ src/DLD-FUNCTIONS/__glpk__.cc       4 Apr 2007 03:22:08 -0000
@@ -257,7 +257,8 @@
 
   if (save_pb)
     {
-      if (lpx_write_cpxlp (lp, "outpb.lp") != 0)
+      static char tmp[] = "outpb.lp";
+      if (lpx_write_cpxlp (lp, tmp) != 0)
        {
          error ("__glpk__: unable to write problem");
          longjmp (mark, -1);
@@ -308,7 +309,8 @@
 #ifdef GLPK_PRE_4_14
       insist (method != method);
 #else
-      glpk_fault_hook (0, "method != method");
+      static char tmp[] = "method != method";
+      glpk_fault_hook (0, tmp);
 #endif
     }
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]