[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-patches
Subject:    warning fix : ns/lib/layout/edtbuf.cpp
From:       Rick Osborne <rick () spacey ! net>
Date:       1998-04-14 1:14:50
[Download RAW message or body]

(In the continuing quest to eliminate even compiler warnings ... )

(14345) : warning : 'formatting' : unreferenced local variable
(14345) : warning : 'i' : unreferenced local variable
(14451) : warning : 'i' : unreferenced local variable

Basic stuff.  We didn't get an warning for selection, but that's just
because it's an object instead of a primitive.  We don't use it anyway.
(Look ma, I saved an object creation/deletion!)

Bugzilla #197.

--- edtbuf.old.cpp      Wed Apr 08 17:52:23 1998
+++ edtbuf.cpp  Mon Apr 13 21:10:17 1998
@@ -14320,7 +14320,9 @@ CEditBuffer::ReplaceOnce( char *pReplace
     you want replaced has been selected already. */

+#ifdef FORMATING_FIXED  /* these vars use only in this context */
     CEditSelection selection;
        int i;
     EDT_CharacterData  *formatting;  /* This will hold the formatting of
the selected text */
+#endif

 #ifdef FORMATING_FIXED
@@ -14352,5 +14354,6 @@ CEditBuffer::ReplaceLoop(char *pReplaceT
                          XP_Bool bBackward, XP_Bool bDoWrap )
 {
-       int i;
+    /* We don't need this, but I'm sure it was a good idea at the time */
+    /* int i; */
     LO_Element *start_ele_loc, *end_ele_loc,
                *original_start_ele_loc, *original_end_ele_loc;

<!-- Rick Osborne -- http://www.rixsoft.com/resume.pdf -->
ActiveX! ActiveX! Format Hard drive? Just say yes!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic