help-octave
[Top][All Lists]
Advanced

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

Re: warning: variable switch label


From: John W. Eaton
Subject: Re: warning: variable switch label
Date: Sun, 2 Jul 2006 14:23:51 -0400

On  2-Jul-2006, Søren Hauberg wrote:

| I see, thanks. I looked at warning_ids and found
| `Octave:variable-switch-label', which I assume is the warning I got. If
| so, then there's another bug because this warning is disabled.

OK, a couple of errors were introduced when the conversion from the
old warn_* built-in variables was done.  Please try the following
patch.

Thanks,

jwe


src/ChangeLog:

2006-07-02  John W. Eaton  <address@hidden>

        * ov-str-mat.cc (CHAR_MATRIX_CONV): Omit "warn-" from label.
        * parse.y (maybe_warn_variable_switch_label): Likewise.


Index: src/ov-str-mat.cc
===================================================================
RCS file: /cvs/octave/src/ov-str-mat.cc,v
retrieving revision 1.62
diff -u -u -r1.62 ov-str-mat.cc
--- src/ov-str-mat.cc   23 May 2006 06:05:14 -0000      1.62
+++ src/ov-str-mat.cc   2 Jul 2006 17:44:21 -0000
@@ -176,7 +176,7 @@
     gripe_invalid_conversion ("string", TNAME); \
   else \
     { \
-      warning_with_id ("Octave:warn-str-to-num", \
+      warning_with_id ("Octave:str-to-num", \
                       "implicit conversion from %s to %s", \
                       "string", TNAME); \
  \
Index: src/parse.y
===================================================================
RCS file: /cvs/octave/src/parse.y,v
retrieving revision 1.264
diff -u -u -r1.264 parse.y
--- src/parse.y 1 Jul 2006 15:24:44 -0000       1.264
+++ src/parse.y 2 Jul 2006 17:44:21 -0000
@@ -1533,7 +1533,7 @@
 maybe_warn_variable_switch_label (tree_expression *expr)
 {
   if (! expr->is_constant ())
-    warning_with_id ("Octave:warn-variable-switch-label",
+    warning_with_id ("Octave:variable-switch-label",
                     "variable switch label");
 }
 



reply via email to

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