diff options
| author | Scott Tsai <scottt.tw@gmail.com> | 2009-03-21 07:41:30 +0800 |
|---|---|---|
| committer | Scott Tsai <scottt.tw@gmail.com> | 2009-03-21 07:41:30 +0800 |
| commit | 0c4ee7741c94376599256f923c08dac18d090e97 (patch) | |
| tree | e1f661f56a38aa9597f0b70f2ffedb4bf378aaca /emulator/qtools | |
| parent | 3e2a2d312abdcd476ef9612bd4057d5aee289227 (diff) | |
| download | android_development-0c4ee7741c94376599256f923c08dac18d090e97.tar.gz android_development-0c4ee7741c94376599256f923c08dac18d090e97.tar.bz2 android_development-0c4ee7741c94376599256f923c08dac18d090e97.zip | |
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')
| -rw-r--r-- | emulator/qtools/trace_reader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/emulator/qtools/trace_reader.cpp b/emulator/qtools/trace_reader.cpp index b38c0b418..0bf64ddba 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; |
