aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SortTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:03:39 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-06-06 12:03:39 +0000
commit42639cddc33746b351bbf07c540711eefffe191a (patch)
tree2032cc41146f1d05732f5e666b1189097dca02f0 /tests/SortTest.cpp
parent06c279e42a9c69de8d5e8a4a59537422e074a79e (diff)
fix warnings on Mac in tests
Fix these class of warnings: - unused functions - unused locals - sign mismatch - missing function prototypes - missing newline at end of file - 64 to 32 bit truncation The changes prefer to link in dead code in the debug build with 'if (false)' than to comment it out, but trivial cases are commented out or sometimes deleted if it appears to be a copy/paste error. Review URL: https://codereview.appspot.com/6301045 git-svn-id: http://skia.googlecode.com/svn/trunk@4175 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/SortTest.cpp')
-rw-r--r--tests/SortTest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/SortTest.cpp b/tests/SortTest.cpp
index 166cff280b..4a5631daef 100644
--- a/tests/SortTest.cpp
+++ b/tests/SortTest.cpp
@@ -10,7 +10,7 @@
#include "SkTSort.h"
extern "C" {
- int compare_int(const void* a, const void* b) {
+ static int compare_int(const void* a, const void* b) {
return *(const int*)a - *(const int*)b;
}
}
@@ -44,6 +44,9 @@ static void TestSort(skiatest::Reporter* reporter) {
SkTHeapSort<int>(array, count);
check_sort(reporter, "Heap", array, count);
}
+ if (false) { // avoid bit rot, suppress warning
+ compare_int(array, array);
+ }
}
// need tests for SkStrSearch