[Top][All Lists]

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

Re: [Gnash-dev] Error compiling trunk on Ubuntu Hardy

From: Benjamin Wolsey
Subject: Re: [Gnash-dev] Error compiling trunk on Ubuntu Hardy
Date: Thu, 12 Feb 2009 12:43:41 +0100

Am Donnerstag, den 12.02.2009, 01:51 -0800 schrieb John Gilmore:
> gst/MediaParserGst.cpp: In member function `bool 
> gnash::media::gst::MediaParserGst::pushGstBuffer()':
> gst/MediaParserGst.cpp:204: error: ISO C++ says that these are ambiguous, 
> even though the worst conversion for the first is better than the worst 
> conversion for the second:
> /usr/include/c++/4.2/bits/postypes.h:175: note: candidate 1: 
> std::fpos<_StateT> std::fpos<_StateT>::operator-(std::streamoff) const [with 
> _StateT = __mbstate_t]
> gst/MediaParserGst.cpp:204: note: candidate 2: operator-(std::streamoff, 
> size_t) <built-in>
> It looks like an example of why you should never write code in C++.
> Straightforward looking code like this:
>   _stream->seek(_stream->tell()-ret);

The error message is horrible, and indeed my intention to reduce casts
and the consequent problems with signed / unsigned types didn't really
come off - it turned out that slightly older compilers baulked at all
sorts of similar things.

Partly it's a result of having to do seek(tell() - x), which isn't very
nice, instead of seek(x, direction = ios_base::cur) using an offset.

In this case it seems to be a reasonable failure for using the wrong
type. That error should be fixed now, but I'm about to check the gst
build on Etch to see if there are more errors.

> There's also a logic bug in the same file, caught by the compiler:
> gst/MediaParserGst.cpp: In member function `bool 
> gnash::media::gst::MediaParserGst::probingConditionsMet(const 
> gnash::media::gst::SimpleTimer&)':
> gst/MediaParserGst.cpp:259: warning: comparison of unsigned expression >= 0 
> is always true
> make[2]: *** [libgnashmedia_la-MediaParserGst.lo] Error 1

> This is from:
>    getBytesLoaded() >= MIN_PROBE_SIZE
> where MIN_PROBE_SIZE is 0.  It's defined in the same file, with a commented
> out definition as (PUSHBUF_SIZE * 3).  ???

I've no idea what the purpose of MIN_PROBE_SIZE is, so I'll leave it to
someone who does.

The current release of Gnash is 0.8.4

Benjamin Wolsey, Software Developer -

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

reply via email to

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