Index: test/cctest/test-cpu-profiler.cc |
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc |
index a8cbdd505cfe0626de7669c6d952a5cccd8dca52..8ef7e0c3d525d0ca854f5a5cba77c672a2dae680 100644 |
--- a/test/cctest/test-cpu-profiler.cc |
+++ b/test/cctest/test-cpu-profiler.cc |
@@ -56,8 +56,10 @@ static v8::Local<v8::Function> GetFunction(v8::Context* env, const char* name) { |
} |
-static int offset(const char* src, const char* substring) { |
- return static_cast<int>(strstr(src, substring) - src); |
+static unsigned int offset(const char* src, const char* substring) { |
yurys
2015/03/30 20:33:16
unsigned int -> unsigned
loislo
2015/03/31 08:22:51
done
|
+ const char* it = strstr(src, substring); |
+ CHECK(it); |
+ return static_cast<unsigned int>(it - src); |
yurys
2015/03/30 20:33:16
unsigned int -> unsigned
loislo
2015/03/31 08:22:51
done
|
} |