[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10571: Fix build on older gcc by sw
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10571: Fix build on older gcc by swapping operands about and casting 0 to |
Date: |
Wed, 11 Feb 2009 14:58:37 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10571
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Wed 2009-02-11 14:58:37 -0700
message:
Fix build on older gcc by swapping operands about and casting 0 to
streampos where necessary.
modified:
libbase/curl_adapter.cpp
libbase/noseek_fd_adapter.cpp
libbase/tu_file.cpp
libcore/asobj/NetStream_as.cpp
libmedia/FLVParser.cpp
libmedia/ffmpeg/MediaParserFfmpeg.cpp
=== modified file 'libbase/curl_adapter.cpp'
--- a/libbase/curl_adapter.cpp 2009-02-11 07:48:07 +0000
+++ b/libbase/curl_adapter.cpp 2009-02-11 21:58:37 +0000
@@ -1050,7 +1050,7 @@
log_debug ("read(%d) called", bytes);
#endif
- fillCache(tell() + bytes);
+ fillCache(bytes + tell());
if ( _error ) return 0; // error can be set by fillCache
#ifdef GNASH_CURL_VERBOSE
=== modified file 'libbase/noseek_fd_adapter.cpp'
--- a/libbase/noseek_fd_adapter.cpp 2009-02-10 11:33:38 +0000
+++ b/libbase/noseek_fd_adapter.cpp 2009-02-11 21:58:37 +0000
@@ -202,8 +202,10 @@
std::cerr << boost::format(" fill_cache(%d) called") % size << std::endl;
#endif
+ assert(size >= 0);
+
// See how big is the cache
- while ( _cached < size )
+ while (_cached < static_cast<size_t>(size))
{
#ifdef GNASH_NOSEEK_FD_VERBOSE
@@ -302,8 +304,7 @@
return 0;
}
-
- fill_cache(tell() + bytes);
+ fill_cache(bytes + tell());
#ifdef GNASH_NOSEEK_FD_VERBOSE
printInfo();
=== modified file 'libbase/tu_file.cpp'
--- a/libbase/tu_file.cpp 2009-02-10 11:33:38 +0000
+++ b/libbase/tu_file.cpp 2009-02-11 21:58:37 +0000
@@ -66,7 +66,9 @@
tu_file::go_to_end()
{
std::streampos s = std::fseek(static_cast<FILE*>(m_data), 0, SEEK_END);
- if (s != EOF) throw IOException("Error while seeking to end");
+ if (s != static_cast<std::streampos>(EOF)) {
+ throw IOException("Error while seeking to end");
+ }
}
std::streampos
=== modified file 'libcore/asobj/NetStream_as.cpp'
--- a/libcore/asobj/NetStream_as.cpp 2009-02-09 12:30:31 +0000
+++ b/libcore/asobj/NetStream_as.cpp 2009-02-11 21:58:37 +0000
@@ -563,7 +563,7 @@
return false;
}
- assert(_inputStream->tell() == 0);
+ assert(_inputStream->tell() == static_cast<std::streampos>(0));
inputPos = 0;
if (!_mediaHandler)
=== modified file 'libmedia/FLVParser.cpp'
--- a/libmedia/FLVParser.cpp 2009-02-10 11:33:38 +0000
+++ b/libmedia/FLVParser.cpp 2009-02-11 21:58:37 +0000
@@ -490,7 +490,7 @@
// would be called by MAIN thread
bool FLVParser::parseHeader()
{
- assert(_stream->tell() == 0);
+ assert(_stream->tell() == static_cast<std::streampos>(0));
// We only use 5 bytes of the header, because the last 4 bytes represent
// an integer which is always 1.
=== modified file 'libmedia/ffmpeg/MediaParserFfmpeg.cpp'
--- a/libmedia/ffmpeg/MediaParserFfmpeg.cpp 2009-01-22 20:10:39 +0000
+++ b/libmedia/ffmpeg/MediaParserFfmpeg.cpp 2009-02-11 21:58:37 +0000
@@ -63,7 +63,7 @@
probe_data.buf = buffer.get();
probe_data.buf_size = 2048;
- assert(_stream->tell() == 0);
+ assert(_stream->tell() == static_cast<std::streampos>(0));
size_t actuallyRead = _stream->read(probe_data.buf,
probe_data.buf_size);
_stream->seek(0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10571: Fix build on older gcc by swapping operands about and casting 0 to,
Benjamin Wolsey <=