aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/images/SkFDStream.cpp4
-rw-r--r--src/images/SkImageDecoder_libbmp.cpp2
-rw-r--r--src/images/SkImageDecoder_libico.cpp4
-rw-r--r--src/images/SkImageDecoder_libjpeg.cpp2
-rw-r--r--src/images/SkImageDecoder_wbmp.cpp2
-rw-r--r--src/images/SkJpegUtility.cpp4
6 files changed, 11 insertions, 7 deletions
diff --git a/src/images/SkFDStream.cpp b/src/images/SkFDStream.cpp
index e1e214a24f..5bf0850ee3 100644
--- a/src/images/SkFDStream.cpp
+++ b/src/images/SkFDStream.cpp
@@ -57,7 +57,7 @@ size_t SkFDStream::read(void* buffer, size_t size) {
#endif
return 0;
}
- return size;
+ return (size_t) size;
} else if (NULL == buffer) { // skip
off_t oldCurr = ::lseek(fFD, 0, SEEK_CUR);
if (oldCurr < 0) {
@@ -74,7 +74,7 @@ size_t SkFDStream::read(void* buffer, size_t size) {
return 0; // error;
}
// return the actual amount we skipped
- return newCurr - oldCurr;
+ return (size_t) (newCurr - oldCurr);
} else { // read
ssize_t actual = ::read(fFD, buffer, size);
// our API can't return an error, so we return 0
diff --git a/src/images/SkImageDecoder_libbmp.cpp b/src/images/SkImageDecoder_libbmp.cpp
index fa752956ea..d3bb871111 100644
--- a/src/images/SkImageDecoder_libbmp.cpp
+++ b/src/images/SkImageDecoder_libbmp.cpp
@@ -31,7 +31,7 @@ protected:
DEFINE_DECODER_CREATOR(BMPImageDecoder);
///////////////////////////////////////////////////////////////////////////////
-SkImageDecoder* sk_libbmp_dfactory(SkStream* stream) {
+static SkImageDecoder* sk_libbmp_dfactory(SkStream* stream) {
static const char kBmpMagic[] = { 'B', 'M' };
size_t len = stream->getLength();
diff --git a/src/images/SkImageDecoder_libico.cpp b/src/images/SkImageDecoder_libico.cpp
index 347334430e..30611cbd33 100644
--- a/src/images/SkImageDecoder_libico.cpp
+++ b/src/images/SkImageDecoder_libico.cpp
@@ -24,9 +24,11 @@ protected:
virtual bool onDecode(SkStream* stream, SkBitmap* bm, Mode);
};
+#if 0 // UNUSED
SkImageDecoder* SkCreateICOImageDecoder() {
return new SkICOImageDecoder;
}
+#endif
/////////////////////////////////////////////////////////////////////////////////////////
@@ -372,7 +374,7 @@ DEFINE_DECODER_CREATOR(ICOImageDecoder);
#include "SkTRegistry.h"
-SkImageDecoder* sk_libico_dfactory(SkStream* stream) {
+static SkImageDecoder* sk_libico_dfactory(SkStream* stream) {
// Check to see if the first four bytes are 0,0,1,0
// FIXME: Is that required and sufficient?
SkAutoMalloc autoMal(4);
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 0c2b81654c..8989d35d58 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -656,7 +656,7 @@ DEFINE_ENCODER_CREATOR(JPEGImageEncoder);
#include "SkTRegistry.h"
-SkImageDecoder* sk_libjpeg_dfactory(SkStream* stream) {
+static SkImageDecoder* sk_libjpeg_dfactory(SkStream* stream) {
static const unsigned char gHeader[] = { 0xFF, 0xD8, 0xFF };
static const size_t HEADER_SIZE = sizeof(gHeader);
diff --git a/src/images/SkImageDecoder_wbmp.cpp b/src/images/SkImageDecoder_wbmp.cpp
index 28a370550b..a3faf3dbfd 100644
--- a/src/images/SkImageDecoder_wbmp.cpp
+++ b/src/images/SkImageDecoder_wbmp.cpp
@@ -153,7 +153,7 @@ DEFINE_DECODER_CREATOR(WBMPImageDecoder);
#include "SkTRegistry.h"
-SkImageDecoder* sk_wbmp_dfactory(SkStream* stream) {
+static SkImageDecoder* sk_wbmp_dfactory(SkStream* stream) {
wbmp_head head;
if (head.init(stream)) {
diff --git a/src/images/SkJpegUtility.cpp b/src/images/SkJpegUtility.cpp
index e28c51229f..19db0186d2 100644
--- a/src/images/SkJpegUtility.cpp
+++ b/src/images/SkJpegUtility.cpp
@@ -74,6 +74,7 @@ static boolean sk_resync_to_restart(j_decompress_ptr cinfo, int desired) {
static void sk_term_source(j_decompress_ptr /*cinfo*/) {}
+#if 0 // UNUSED
static void skmem_init_source(j_decompress_ptr cinfo) {
skjpeg_source_mgr* src = (skjpeg_source_mgr*)cinfo->src;
src->next_input_byte = (const JOCTET*)src->fMemoryBase;
@@ -98,6 +99,7 @@ static boolean skmem_resync_to_restart(j_decompress_ptr cinfo, int desired) {
}
static void skmem_term_source(j_decompress_ptr /*cinfo*/) {}
+#endif
///////////////////////////////////////////////////////////////////////////////
@@ -105,7 +107,7 @@ static void skmem_term_source(j_decompress_ptr /*cinfo*/) {}
skjpeg_source_mgr::skjpeg_source_mgr(SkStream* stream, SkImageDecoder* decoder,
bool ownStream) : fStream(stream) {
fDecoder = decoder;
- const void* baseAddr = stream->getMemoryBase();
+ // const void* baseAddr = stream->getMemoryBase();
fMemoryBase = NULL;
fUnrefStream = ownStream;
fMemoryBaseSize = 0;