gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r10732: eliminate most of the compil


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10732: eliminate most of the compiler warnings, typicaly unused parameters.
Date: Thu, 19 Mar 2009 17:14:43 -0600
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 10732
committer: address@hidden
branch nick: trunk
timestamp: Thu 2009-03-19 17:14:43 -0600
message:
  eliminate most of the compiler warnings, typicaly unused parameters.
modified:
  cygnal/Makefile.am
  cygnal/crc.cpp
  cygnal/cygnal.cpp
  gui/gtk_glue_agg_xv.cpp
  libamf/amf_msg.cpp
  libbase/jemalloc.c
  libcore/BitmapMovieInstance.cpp
  libcore/MovieClip.cpp
  libmedia/gst/swfdec_codec_gst.c
  testsuite/DummyMovieDefinition.h
  testsuite/misc-swfc.all/button_test1runner.cpp
=== modified file 'cygnal/Makefile.am'
--- a/cygnal/Makefile.am        2009-03-09 15:34:27 +0000
+++ b/cygnal/Makefile.am        2009-03-19 23:14:43 +0000
@@ -25,11 +25,10 @@
 endif
 
 SUBDIRS = \
-       $(TEST_DIR) \
-       .
+       $(TEST_DIR)
 
 # we don't want these anymore
-#DIST_SUBDIRS  = ACT IO HTTP Net unit_tests 
+DIST_SUBDIRS  = testsuite
 
 AM_CPPFLAGS = # -Wall
 

=== modified file 'cygnal/crc.cpp'
--- a/cygnal/crc.cpp    2009-02-25 22:33:03 +0000
+++ b/cygnal/crc.cpp    2009-03-19 23:14:43 +0000
@@ -235,18 +235,18 @@
 void
 CRcInitFile::dump(std::ostream& os) const
 {
-    cerr << endl << "Dump CRcInitFile:" << endl;
-    cerr << "\tVerbosity Level: " << _verbosity << endl;
-    cerr << "\tDump ActionScript processing: "
+    os << endl << "Dump CRcInitFile:" << endl;
+    os << "\tVerbosity Level: " << _verbosity << endl;
+    os << "\tDump ActionScript processing: "
          << ((_actionDump)?"enabled":"disabled") << endl;
-    cerr << "\tDump parser info: "
+    os << "\tDump parser info: "
          << ((_parserDump)?"enabled":"disabled") << endl;
-    cerr << "\tActionScript coding errors verbosity: "
+    os << "\tActionScript coding errors verbosity: "
          << ((_verboseASCodingErrors)?"enabled":"disabled") << endl;
-    cerr << "\tPort Offset: " << _port_offset << endl;
-    cerr << "\tThreading support: "
+    os << "\tPort Offset: " << _port_offset << endl;
+    os << "\tThreading support: "
          << ((_threading)?"enabled":"disabled") << endl;
-    cerr << "\tSpecial Testing output for Gnash: "
+    os << "\tSpecial Testing output for Gnash: "
          << ((_testing)?"enabled":"disabled") << endl;
 
 //    RcInitFile::dump();

=== modified file 'cygnal/cygnal.cpp'
--- a/cygnal/cygnal.cpp 2009-03-03 23:44:40 +0000
+++ b/cygnal/cygnal.cpp 2009-03-19 23:14:43 +0000
@@ -88,6 +88,10 @@
 #include <boost/thread/condition.hpp>
 #include <boost/thread/tss.hpp>
 
+#ifndef POLLRDHUP
+#define POLLRDHUP 0
+#endif
+
 //using gnash::log_debug;
 using namespace std;
 using namespace gnash;
@@ -674,7 +678,7 @@
                        // We got some data, so process it
                        log_debug("Got something on fd #%d, 0x%x", it->fd, 
it->revents);
                        // Call the protocol handler for this network connection
-                       bool ret = net->getEntry(it->fd)(args);
+//                     bool ret = net->getEntry(it->fd)(args);
                        
 //                     log_debug("Handler returned %s", (ret) ? "true" : 
"false");
                        // FIXME: we currently force a 'close connection' at 
the end

=== modified file 'gui/gtk_glue_agg_xv.cpp'
--- a/gui/gtk_glue_agg_xv.cpp   2009-02-25 02:00:44 +0000
+++ b/gui/gtk_glue_agg_xv.cpp   2009-03-19 23:14:43 +0000
@@ -175,7 +175,7 @@
 }
 
 void
-GtkAggXvGlue::render(int minx, int miny, int maxx, int maxy)
+GtkAggXvGlue::render(int /* minx */, int /* miny */, int /* maxx */, int /* 
maxy */)
 {
     if (!_drawing_area || !_xv_image) {
         return;

=== modified file 'libamf/amf_msg.cpp'
--- a/libamf/amf_msg.cpp        2009-03-03 22:20:40 +0000
+++ b/libamf/amf_msg.cpp        2009-03-19 23:14:43 +0000
@@ -66,8 +66,8 @@
 {
 //    GNASH_REPORT_FUNCTION;
     // The size of the buffer are the two strings, their lenght fields, and 
the integer.
-    size_t size = head->target.size() + head->response.size() + 
sizeof(boost::uint32_t)
-        + (sizeof(boost::uint16_t) * 2);
+//     size_t size = head->target.size() + head->response.size() + 
sizeof(boost::uint32_t)
+//         + (sizeof(boost::uint16_t) * 2);
     boost::shared_ptr<amf::Buffer> buf (new 
amf::Buffer(sizeof(AMF_msg::message_header_t)));
 
     // Encode the target URI, which usually looks something like ."getway"
@@ -95,7 +95,7 @@
 }
 
 boost::shared_ptr<AMF_msg::context_header_t>
-AMF_msg::parseContextHeader(boost::uint8_t *data, size_t size)
+AMF_msg::parseContextHeader(boost::uint8_t *data, size_t /* size */)
 {
 //    GNASH_REPORT_FUNCTION;
     boost::shared_ptr<AMF_msg::context_header_t> msg (new 
AMF_msg::context_header_t);
@@ -135,7 +135,7 @@
     tmpptr += sizeof(boost::uint16_t);
     string str1(reinterpret_cast<const char *>(tmpptr), length);
     msg->target = str1;
-    if ((tmpptr - data) > size) {
+    if (static_cast<size_t>(tmpptr - data) > size) {
         boost::format msg("Trying to read past the end of data! Wants %1% 
bytes, given %2% bytes");
         msg % length % size;
         throw GnashException(msg.str());
@@ -154,7 +154,7 @@
     string str2(reinterpret_cast<const char *>(tmpptr), length);
     msg->response = str2;
     tmpptr += length;
-    if ((tmpptr - data) > size) {
+    if (static_cast<size_t>(tmpptr - data) > size) {
         boost::format msg("Trying to read past the end of data! Wants %1% 
bytes, given %2% bytes");
         msg % length % size;
         throw GnashException(msg.str());
@@ -222,9 +222,12 @@
 }
 
 boost::shared_ptr<amf::Buffer>
-AMF_msg::encodeAMFPacket(const std::string &target,
-                         const std::string &response, size_t size)
+AMF_msg::encodeAMFPacket(const std::string &/* target */,
+                         const std::string &/* response */, size_t /* size */)
 {
+//    GNASH_REPORT_FUNCTION;
+
+    return encodeAMFPacket();
 }
 
 boost::shared_ptr<amf::Buffer>

=== modified file 'libbase/jemalloc.c'
--- a/libbase/jemalloc.c        2008-04-30 17:02:05 +0000
+++ b/libbase/jemalloc.c        2009-03-19 23:14:43 +0000
@@ -3328,6 +3328,7 @@
 arena_bin_malloc_easy(arena_t *arena, arena_bin_t *bin, arena_run_t *run)
 {
        void *ret;
+        arena = 0;              /* this is just to quiet a compiler warning */
 
        assert(run->magic == ARENA_RUN_MAGIC);
        assert(run->nfree > 0);
@@ -4046,6 +4047,7 @@
        /* Large allocation. */
        malloc_spin_lock(&arena->lock);
 
+        chunk = 0;              /* this is just to quiet a compiler warning */
 #ifdef MALLOC_FILL
 #ifndef MALLOC_STATS
        if (opt_junk)

=== modified file 'libcore/BitmapMovieInstance.cpp'
--- a/libcore/BitmapMovieInstance.cpp   2009-03-10 20:43:50 +0000
+++ b/libcore/BitmapMovieInstance.cpp   2009-03-19 23:14:43 +0000
@@ -41,8 +41,9 @@
 }
 
 std::auto_ptr<GnashImage>
-BitmapMovieInstance::drawToBitmap(const SWFMatrix& mat, const cxform& cx,
-        character::BlendMode bm, const rect& clipRect, bool smooth)
+BitmapMovieInstance::drawToBitmap(const SWFMatrix& /* mat */, const cxform& /* 
cx */,
+                                  character::BlendMode /* bm */, const rect& 
/* clipRect */,
+                                  bool /* smooth */)
 {
     return std::auto_ptr<GnashImage>();
 }

=== modified file 'libcore/MovieClip.cpp'
--- a/libcore/MovieClip.cpp     2009-03-17 12:01:42 +0000
+++ b/libcore/MovieClip.cpp     2009-03-19 23:14:43 +0000
@@ -1489,8 +1489,9 @@
 }
 
 std::auto_ptr<GnashImage>
-MovieClip::drawToBitmap(const SWFMatrix& mat, const cxform& cx,
-        character::BlendMode bm, const rect& clipRect, bool smooth)
+MovieClip::drawToBitmap(const SWFMatrix& /* mat */, const cxform& /* cx */,
+                        character::BlendMode /* bm */, const rect& /* clipRect 
*/,
+                        bool /* smooth */)
 {
     return std::auto_ptr<GnashImage>();
 }

=== modified file 'libmedia/gst/swfdec_codec_gst.c'
--- a/libmedia/gst/swfdec_codec_gst.c   2009-02-25 20:43:02 +0000
+++ b/libmedia/gst/swfdec_codec_gst.c   2009-03-19 23:14:43 +0000
@@ -118,8 +118,8 @@
 swfdec_gst_compare_features (gconstpointer a_, gconstpointer b_)
 {
   int diff;
-  GstPluginFeature *a = GST_PLUGIN_FEATURE (a_);
-  GstPluginFeature *b = GST_PLUGIN_FEATURE (b_);
+  GstPluginFeature *a = (GstPluginFeature *)GST_PLUGIN_FEATURE (a_);
+  GstPluginFeature *b = (GstPluginFeature *)GST_PLUGIN_FEATURE (b_);
 
   diff = gst_plugin_feature_get_rank (b) - gst_plugin_feature_get_rank (a);
   if (diff != 0)

=== modified file 'testsuite/DummyMovieDefinition.h'
--- a/testsuite/DummyMovieDefinition.h  2009-03-11 06:34:47 +0000
+++ b/testsuite/DummyMovieDefinition.h  2009-03-19 23:14:43 +0000
@@ -50,7 +50,7 @@
 
 public:
 
-    virtual character* createDisplayObject(character*, int id) { return 0; }
+        virtual character* createDisplayObject(character*, int /* id */) { 
return 0; }
 
 
        /// Default constructor

=== modified file 'testsuite/misc-swfc.all/button_test1runner.cpp'
--- a/testsuite/misc-swfc.all/button_test1runner.cpp    2009-02-25 22:33:03 
+0000
+++ b/testsuite/misc-swfc.all/button_test1runner.cpp    2009-03-19 23:14:43 
+0000
@@ -157,7 +157,9 @@
        //----------------------------------------
 
        as_value eot;
-       bool endOfTestFound = root->get_member(st.find("testcompleted"), &eot);
+        
+        root->get_member(st.find("testcompleted"), &eot);
+        
        //cerr << "EOT is " << eot.to_debug_string() << endl;
        check(eot.to_bool());
 }


reply via email to

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