gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash server/vm/ASHandlers.cpp ChangeLog


From: Sandro Santilli
Subject: [Gnash-commit] gnash server/vm/ASHandlers.cpp ChangeLog
Date: Thu, 08 Nov 2007 14:31:56 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/08 14:31:56

Modified files:
        server/vm      : ASHandlers.cpp 
        .              : ChangeLog 

Log message:
                * server/vm/ASHandlers.cpp: fix compiler warnings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/server/vm/ASHandlers.cpp?cvsroot=gnash&r1=1.148&r2=1.149
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4804&r2=1.4805

Patches:
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -b -r1.148 -r1.149
--- server/vm/ASHandlers.cpp    1 Nov 2007 16:14:20 -0000       1.148
+++ server/vm/ASHandlers.cpp    8 Nov 2007 14:31:55 -0000       1.149
@@ -17,7 +17,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 //
 
-/* $Id: ASHandlers.cpp,v 1.148 2007/11/01 16:14:20 strk Exp $ */
+/* $Id: ASHandlers.cpp,v 1.149 2007/11/08 14:31:55 strk Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -473,9 +473,11 @@
 //    GNASH_REPORT_FUNCTION;
 
        as_environment& env = thread.env;
-       const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
+       const action_buffer& code = thread.code;
        assert( code[thread.pc] == SWF::ACTION_NEXTFRAME );
+#endif
 
        sprite_instance* tgt = env.get_target()->to_movie();
        assert(tgt);
@@ -488,9 +490,11 @@
 //    GNASH_REPORT_FUNCTION;
 
        as_environment& env = thread.env;
-       const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
+       const action_buffer& code = thread.code;
        assert( code[thread.pc] == SWF::ACTION_PREVFRAME );
+#endif
 
        sprite_instance* tgt = env.get_target()->to_movie();
        assert(tgt);
@@ -503,9 +507,12 @@
 //    GNASH_REPORT_FUNCTION;
 
     as_environment& env = thread.env;
-    const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
+    const action_buffer& code = thread.code;
     assert( code[thread.pc] == SWF::ACTION_PLAY );
+#endif
+
     sprite_instance* tgt = env.get_target()->to_movie();
     assert(tgt);
     tgt->set_play_state(sprite_instance::PLAY);
@@ -517,9 +524,11 @@
 //    GNASH_REPORT_FUNCTION;
 
     as_environment& env = thread.env;
-    const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
+    const action_buffer& code = thread.code;
     assert( code[thread.pc] == SWF::ACTION_STOP );
+#endif
 
     sound_handler* s = get_sound_handler();
 
@@ -541,9 +550,11 @@
 //    GNASH_REPORT_FUNCTION;
 
     //as_environment& env = thread.env;
+#ifndef NDEBUG
     const action_buffer& code = thread.code;
-
     assert( code[thread.pc] == SWF::ACTION_TOGGLEQUALITY );
+#endif
+
     log_unimpl (__PRETTY_FUNCTION__);
 }
 
@@ -553,9 +564,11 @@
 //    GNASH_REPORT_FUNCTION;
 
        //as_environment& env = thread.env;
-       const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
+       const action_buffer& code = thread.code;
        assert( code[thread.pc] == SWF::ACTION_STOPSOUNDS );
+#endif
 
        sound_handler* s = get_sound_handler();
        if (s != NULL)
@@ -670,7 +683,8 @@
 {
 //     GNASH_REPORT_FUNCTION;
 
-       as_environment& env = thread.env;
+       //as_environment& env = thread.env;
+
        const action_buffer& code = thread.code;
        size_t pc = thread.pc;
 
@@ -2974,7 +2988,7 @@
     thread.ensureStack(2); // member name, target
 
     // Some corner case behaviors depend on the SWF file version.
-    int version = env.get_version();
+    //int version = env.get_version();
 
     as_value member_name = env.top(0);
     as_value target = env.top(1);
@@ -3683,9 +3697,11 @@
 
        as_environment& env = thread.env;
        const action_buffer& code = thread.code;
-       size_t pc = thread.pc;
 
+#ifndef NDEBUG
+       size_t pc = thread.pc;
        assert( code[pc] == SWF::ACTION_TRY );
+#endif
 
        size_t i = thread.pc + 3; // skip tag id and length
 
@@ -3805,10 +3821,11 @@
        as_environment& env = thread.env;
        const action_buffer& code = thread.code;
 
+#ifndef NDEBUG
        int16_t length = code.read_int16(thread.pc+1);
        assert( length >= 0 );
-
        //cerr << " length:" << length << endl;
+#endif
 
        // Create a new swf_function
        // Code starts at thread.next_pc as the DefineFunction tag

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4804
retrieving revision 1.4805
diff -u -b -r1.4804 -r1.4805
--- ChangeLog   8 Nov 2007 10:58:16 -0000       1.4804
+++ ChangeLog   8 Nov 2007 14:31:55 -0000       1.4805
@@ -1,5 +1,6 @@
 2007-11-08 Sandro Santilli <address@hidden>
 
+       * server/vm/ASHandlers.cpp: fix compiler warnings
        * macros/sdl.m4: strip '-L/usr/lib' only if it's a single world
          (ie: not a substring like in -L/usr/lib64)
        * testsuite/misc-swfc.all/movieclip_destruction_test1.sc: fix test,




reply via email to

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