Skip to content

Commit 0b7bd95

Browse files
author
Rene Bolldorf
committed
Fix compilation errors in libmedia, libstagefright.
(invalid conversion from 'const char*' to 'char*') Change-Id: Idef85606b7cff629b2778ed8134c79c892af54c2
1 parent be50507 commit 0b7bd95

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

media/libmedia/MediaScanner.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ status_t MediaScanner::processDirectory(
7777
}
7878

7979
static bool fileMatchesExtension(const char* path, const char* extensions) {
80-
char* extension = strrchr(path, '.');
80+
const char* extension = strrchr(path, '.');
8181
if (!extension) return false;
8282
++extension; // skip the dot
8383
if (extension[0] == 0) return false;
8484

8585
while (extensions[0]) {
86-
char* comma = strchr(extensions, ',');
86+
const char* comma = strchr(extensions, ',');
8787
size_t length = (comma ? comma - extensions : strlen(extensions));
8888
if (length == strlen(extension) && strncasecmp(extension, extensions, length) == 0) return true;
8989
extensions += length;

media/libstagefright/HTTPDataSource.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ HTTPDataSource::HTTPDataSource(
158158
string path;
159159
int port;
160160

161-
char *slash = strchr(uri + 7, '/');
161+
const char *slash = strchr(uri + 7, '/');
162162
if (slash == NULL) {
163163
host = uri + 7;
164164
path = "/";
@@ -167,7 +167,7 @@ HTTPDataSource::HTTPDataSource(
167167
path = slash;
168168
}
169169

170-
char *colon = strchr(host.c_str(), ':');
170+
const char *colon = strchr(host.c_str(), ':');
171171
if (colon == NULL) {
172172
port = 80;
173173
} else {

0 commit comments

Comments
 (0)