gnash-dev
[Top][All Lists]
Advanced

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

Re: [Gnash-dev] action.cpp:1272: error: call of overloaded `pow(int&,


From: Bastiaan Jacques
Subject: Re: [Gnash-dev] action.cpp:1272: error: call of overloaded `pow(int&,
Date: Thu, 20 Apr 2006 20:03:23 +0200
User-agent: KMail/1.9.1

On Thursday 20 April 2006 19:36, Rob Savoye wrote:
>    Thanks for helping eliminate more warnings. Funny enough, I never 
> heard of the z modifier for printf to print a ssize_t till you pointed 
> it out. :-)

No problem. I've attached a patch to this message which removes the two
remaining warnings with gcc-4.1.0; the second of which is nontrivial:

nsPluginInstance::NewStream defines start, end and eq as unsigned ints.
However, string::find() returns size_t. Comparing the start, end or eq
with string::npos will always be a true expression, because npos < 0.

-- 
Bastiaan
Index: libbase/triangulate_impl.h
===================================================================
RCS file: /sources/gnash/gnash/libbase/triangulate_impl.h,v
retrieving revision 1.8
diff -p -u -r1.8 triangulate_impl.h
--- libbase/triangulate_impl.h  30 Mar 2006 19:12:53 -0000      1.8
+++ libbase/triangulate_impl.h  20 Apr 2006 17:54:40 -0000
@@ -1870,7 +1870,7 @@ void      poly_env<coord_t>::init(int path_co
                {
                        // Bad input, odd number of coords.
                        assert(0);
-                       fprintf(stderr, "path[%d] has odd number of coords 
(%d), dropping last value\n", i, path.size());//xxxx
+                       fprintf(stderr, "path[%d] has odd number of coords 
(%zd), dropping last value\n", i, path.size());//xxxx
                        path_size--;
                }
                for (int j = 0; j < path_size; j += 2)  // vertex coords come 
in pairs.
Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.26
diff -p -u -r1.26 plugin.cpp
--- plugin/plugin.cpp   10 Apr 2006 20:21:39 -0000      1.26
+++ plugin/plugin.cpp   20 Apr 2006 17:54:41 -0000
@@ -651,7 +651,7 @@ nsPluginInstance::NewStream(NPMIMEType t
     memset(tmp, 0, 300);
     string url = stream->url;
     string fname, opts;
-    unsigned int start, end, eq;
+    size_t start, end, eq;
     bool dumpopts = false;
 
     log_msg("%s: this = %p, URL is %s", __FUNCTION__,

reply via email to

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