gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9901: Fix compiler warnings. Test f


From: Benjamin Wolsey
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9901: Fix compiler warnings. Test for LoadVars.
Date: Thu, 02 Oct 2008 10:46:53 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9901
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2008-10-02 10:46:53 +0200
message:
  Fix compiler warnings. Test for LoadVars.
modified:
  libcore/asobj/XMLSocket_as.cpp
  libcore/asobj/flash/geom_pkg.cpp
  libcore/parser/abc_block.cpp
  libmedia/AudioDecoderSimple.cpp
  libmedia/ffmpeg/sound_handler_sdl.cpp
  libmedia/sound_handler.h
  testsuite/actionscript.all/LoadVars.as
  utilities/flvdumper.cpp
    ------------------------------------------------------------
    revno: 9900.1.1
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-10-02 09:39:45 +0200
    message:
      Shut the warnings up.
    modified:
      libmedia/sound_handler.h
    ------------------------------------------------------------
    revno: 9900.1.2
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-10-02 09:40:03 +0200
    message:
      Minor logging changes.
    modified:
      libcore/asobj/XMLSocket_as.cpp
    ------------------------------------------------------------
    revno: 9900.1.3
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-10-02 10:42:45 +0200
    message:
      Fix g++4.3 (likely to be default compiler on many distros) warnings and
      some unused variable warnings. 
    modified:
      libcore/asobj/flash/geom_pkg.cpp
      libcore/parser/abc_block.cpp
      libmedia/AudioDecoderSimple.cpp
      libmedia/ffmpeg/sound_handler_sdl.cpp
      utilities/flvdumper.cpp
    ------------------------------------------------------------
    revno: 9900.1.4
    committer: Benjamin Wolsey <address@hidden>
    branch nick: work
    timestamp: Thu 2008-10-02 10:44:20 +0200
    message:
      Test that XML and LoadVars methods are interchangeable. Can cut down
      more code duplication.
    modified:
      testsuite/actionscript.all/LoadVars.as
=== modified file 'libcore/asobj/XMLSocket_as.cpp'
--- a/libcore/asobj/XMLSocket_as.cpp    2008-10-01 07:54:38 +0000
+++ b/libcore/asobj/XMLSocket_as.cpp    2008-10-02 07:40:03 +0000
@@ -155,8 +155,8 @@
     const int fd = _sockfd;
    
     if (fd <= 0) {
-       log_error(_("%s: fd <= 0, returning false (timer not unregistered "
-               "while socket disconnected?"), __FUNCTION__);
+       log_error(_("XMLSocket: fd <= 0, returning false (timer not 
unregistered "
+               "while socket disconnected?"));
         return;
     }
 
@@ -183,8 +183,8 @@
             continue;
         }
         if (ret == -1) {
-            log_error(_("%s: The socket for fd #%d never was available"),
-                __FUNCTION__, fd);
+            log_error(_("XMLSocket: The socket for fd #%d was never "
+                        "available"), fd);
             return;
         }
  

=== modified file 'libcore/asobj/flash/geom_pkg.cpp'
--- a/libcore/asobj/flash/geom_pkg.cpp  2008-10-01 13:04:54 +0000
+++ b/libcore/asobj/flash/geom_pkg.cpp  2008-10-02 08:42:45 +0000
@@ -32,7 +32,7 @@
 namespace gnash {
 
 as_value
-get_flash_geom_package(const fn_call& fn)
+get_flash_geom_package(const fn_call& /*fn*/)
 {
        log_debug("Loading flash.geom package");
 

=== modified file 'libcore/parser/abc_block.cpp'
--- a/libcore/parser/abc_block.cpp      2008-08-18 23:53:04 +0000
+++ b/libcore/parser/abc_block.cpp      2008-10-02 08:42:45 +0000
@@ -1070,7 +1070,7 @@
 
                        // A variable name for the catch type.
                        // In version 46.15, no names.
-                       if (mVersion != (46 << 16) | 15)
+                       if (mVersion != ((46 << 16) | 15))
                        {
                                boost::uint32_t cvn = mS->read_V32();
                                if (cvn >= mMultinamePool.size())

=== modified file 'libmedia/AudioDecoderSimple.cpp'
--- a/libmedia/AudioDecoderSimple.cpp   2008-09-23 17:14:12 +0000
+++ b/libmedia/AudioDecoderSimple.cpp   2008-10-02 08:42:45 +0000
@@ -389,7 +389,7 @@
                                        break;
                                case 0x00:  // Big-endian host
                                        // Swap sample bytes to get big-endian 
format.
-                                       assert(inputSize & 1 == 0);
+                                       assert((inputSize & 1) == 0);
                                        for (unsigned i = 0; i < inputSize; 
i+=2)
                                        {
                                                std::swap(decodedData[i], 
decodedData[i+1]);

=== modified file 'libmedia/ffmpeg/sound_handler_sdl.cpp'
--- a/libmedia/ffmpeg/sound_handler_sdl.cpp     2008-09-29 16:02:53 +0000
+++ b/libmedia/ffmpeg/sound_handler_sdl.cpp     2008-10-02 08:42:45 +0000
@@ -947,7 +947,8 @@
                        decoded_size += tmp_raw_buffer_size;
 
                        // no more to decode from this sound, so we break the 
loop
-                       if (sound.dataSize() <= sound.position && 
sound.loop_count == 0 || tmp_raw_buffer_size == 0 && decodedBytes == 0) {
+                       if ((sound.dataSize() <= sound.position && 
sound.loop_count == 0)
+                    || (tmp_raw_buffer_size == 0 && decodedBytes == 0)) {
                                sound.position = sound.dataSize();
                                break;
                        }

=== modified file 'libmedia/sound_handler.h'
--- a/libmedia/sound_handler.h  2008-09-29 16:02:53 +0000
+++ b/libmedia/sound_handler.h  2008-10-02 07:39:45 +0000
@@ -286,7 +286,8 @@
        ///     removal, see detach_aux_streamer. TODO: stop using the data 
pointer for 
        ///     identification purposes and use the callback pointer directly 
instead.
        ///
-       virtual void    attach_aux_streamer(aux_streamer_ptr ptr, void* 
owner){} // FIXME
+       virtual void    attach_aux_streamer(aux_streamer_ptr /*ptr*/,
+            void* /*owner*/){} // FIXME
 
        /// This is called by AS classes NetStream or Sound to dettach 
callback, so
        /// that audio from the classes no longer will be played through the 
@@ -297,7 +298,7 @@
        ///     WARNING: this need currently be the 'udata' pointer passed to 
attach_aux_streamer.
        ///     TODO: get the aux_streamer_ptr as key !!
        ///
-       virtual void    detach_aux_streamer(void* udata) {} // FIXME
+       virtual void    detach_aux_streamer(void* /*udata*/) {} // FIXME
 
        virtual ~sound_handler() {};
        

=== modified file 'testsuite/actionscript.all/LoadVars.as'
--- a/testsuite/actionscript.all/LoadVars.as    2008-09-16 14:00:27 +0000
+++ b/testsuite/actionscript.all/LoadVars.as    2008-10-02 08:44:20 +0000
@@ -172,6 +172,11 @@
 check_equals(typeof(r.loaded), "boolean");
 check_equals(r.loaded, false);
 
+// The two objects are also interchangeable for these functions.
+x.sendAndLoad = XML.prototype.sendAndLoad;
+xcheck_equals(x.sendAndLoad("some server name", r), true);
+
+
 //--------------------------------------------------------------------------
 // Test LoadVars::load()
 //--------------------------------------------------------------------------

=== modified file 'utilities/flvdumper.cpp'
--- a/utilities/flvdumper.cpp   2008-08-13 22:29:53 +0000
+++ b/utilities/flvdumper.cpp   2008-10-02 08:42:45 +0000
@@ -170,8 +170,8 @@
 
     Flv flv; 
     struct stat st;
-    Network::byte_t *buf = 0;
-    Network::byte_t *ptr = 0;
+    //Network::byte_t *buf = 0;
+    //Network::byte_t *ptr = 0;
     Flv::flv_header_t *head;
     Flv::previous_size_t   previous = 0;
     Flv::flv_tag_t     *tag;


reply via email to

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