aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-07 16:47:43 +0000
committerGravatar humper@google.com <humper@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-01-07 16:47:43 +0000
commit05af1afd429808913683da75644e48bece12e820 (patch)
treeb7f0ec33f2cbbb9312deb9e0e566c8bea4a97320 /tools
parent30454293fd4fae81238c582c18232692bff32b1e (diff)
eliminate all warnings in non-thirdparty code on mac
Most of these issues were due to functions whose definitions appear in header files; I changed those functions to be 'static inline' instead of just 'static' or 'inline', which kills the warning for such functions. Other functions that were static or anonymous-namespaced but were unused in cpp files were probably called at some point but are no longer; someone who knows more than I do should probably scrub all the functions I either deleted or #if 0'ed out and make sure that the right thing is happening here. Lots of unused variables removed, and one nasty const issue handled. There remains a single warning in thirdparty/externals/cityhash/src/city.cc on line 146 related to a signed/unsigned mismatch. I don't know if we have control over this library so I didn't fix this one, but perhaps someone could do something about that one. BUG= Review URL: https://codereview.appspot.com/7067044 git-svn-id: http://skia.googlecode.com/svn/trunk@7051 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools')
-rw-r--r--tools/filtermain.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/filtermain.cpp b/tools/filtermain.cpp
index c1b2040fd0..ab20e3f9ed 100644
--- a/tools/filtermain.cpp
+++ b/tools/filtermain.cpp
@@ -136,11 +136,7 @@ private:
typedef SkPicture INHERITED;
};
-static bool PNGEncodeBitmapToStream(SkWStream* stream, const SkBitmap& bitmap) {
- return SkImageEncoder::EncodeStream(stream, bitmap, SkImageEncoder::kPNG_Type, 100);
-}
-
-int filter_picture(const SkString& inFile, const SkString& outFile,
+static int filter_picture(const SkString& inFile, const SkString& outFile,
const SkString& textureDir, SkFILEWStream *pathStream) {
SkPicture* inPicture = NULL;
@@ -183,6 +179,8 @@ int filter_picture(const SkString& inFile, const SkString& outFile,
// This function is not marked as 'static' so it can be referenced externally
// in the iOS build.
+int tool_main(int argc, char** argv); // suppress a warning on mac
+
int tool_main(int argc, char** argv) {
SkGraphics::Init();
@@ -279,7 +277,7 @@ int tool_main(int argc, char** argv) {
}
SkOSFile::Iter iter(inDir.c_str(), "skp");
- int failures = 0;
+
SkString inputFilename, outputFilename;
if (iter.next(&inputFilename)) {