]> git.lyx.org Git - features.git/commitdiff
Fix a few unitialized variables found by purify (thanks to Michael Schmitt for pointi...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Jan 2000 13:09:19 +0000 (13:09 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Wed, 5 Jan 2000 13:09:19 +0000 (13:09 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@400 a592a061-630c-0410-9148-cb99ea01b6c8

ChangeLog
src/lyxrc.C
src/mathed/math_defs.h

index 9c019076d9d52d2fad2553f6f90e7ccbdbcc0a37..8d9cafaee641d4797c3e55c7b55544e89ffcc05d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-01-05  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
+
+       * src/mathed/math_defs.h (MathedRowSt): make sure that all
+       members of the struct are correctly initialized to 0 (detected by
+       purify) 
+       * src/lyxrc.C (LyXRC): ditto for print_adapt_output.
+
 2000-01-04  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
 
        * src/lyx_gui_misc.C: add a 'using std::make_pair;' statement.
index 0af68c5d0c84ff9f150810f4cfaa478ecb4b3e09..cdb419e60bf667e1ba5a43a401e867fe735df970 100644 (file)
@@ -233,6 +233,7 @@ LyXRC::LyXRC()
        // Get printer from the environment. If fail, use default "",
        // assuming that everything is set up correctly.
        printer = GetEnv("PRINTER");
+       print_adapt_output = false;
        print_command = "dvips";
        print_evenpage_flag = "-B";
        print_oddpage_flag = "-A";
index a8a0d2f9fe46a9dda50329869226cd7958c66c40..669de5783cbd51522475cbed51c14d1dfe34ca35 100644 (file)
@@ -426,6 +426,9 @@ struct MathedRowSt {
     /// 
     MathedRowSt(int n) {
            w = new int[n + 1]; // this leaks
+           asc = desc = y = 0;
+           for (int i = 0 ; i < n + 1 ; ++i)
+             w[i] = 0;
            next = 0;
            label = 0;
            numbered = true;