aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/qtools/trace_reader.cpp
diff options
context:
space:
mode:
authorScott Tsai <scottt.tw@gmail.com>2009-03-21 07:41:30 +0800
committerScott Tsai <scottt.tw@gmail.com>2009-03-21 07:41:30 +0800
commitfa602acc7575c3b557f6e8f6aeac569ab99a3655 (patch)
tree9090ebefb59edcef054b1baf12bec9f3122504cb /emulator/qtools/trace_reader.cpp
parentc4a2e5be95ea859203730b27bf074ba24b04b9ca (diff)
downloadsdk-fa602acc7575c3b557f6e8f6aeac569ab99a3655.zip
sdk-fa602acc7575c3b557f6e8f6aeac569ab99a3655.tar.gz
sdk-fa602acc7575c3b557f6e8f6aeac569ab99a3655.tar.bz2
Correctly expect the return value of rindex(const char*) to be of type
'const char*' to make the code build on gcc-4.4. The C++ spec overloads string fucntions like strtsr and rindex so that rindex(char *) returns 'char*' and rindex(const char*) returns 'const char*'. Without this patch you get an "invalid conversion from ‘const char*’ to ‘char*’" error on gcc-4.4
Diffstat (limited to 'emulator/qtools/trace_reader.cpp')
-rw-r--r--emulator/qtools/trace_reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/emulator/qtools/trace_reader.cpp b/emulator/qtools/trace_reader.cpp
index b38c0b4..0bf64dd 100644
--- a/emulator/qtools/trace_reader.cpp
+++ b/emulator/qtools/trace_reader.cpp
@@ -1009,10 +1009,10 @@ void TraceReaderBase::ParseDexList(char *filename)
// be freed by the caller after it is no longer needed.
static char *ExtractDexPathFromMmap(const char *mmap_path)
{
- char *end = rindex(mmap_path, '@');
+ const char *end = rindex(mmap_path, '@');
if (end == NULL)
return NULL;
- char *start = rindex(mmap_path, '/');
+ const char *start = rindex(mmap_path, '/');
if (start == NULL)
return NULL;
int len = end - start;