diff options
Diffstat (limited to 'adb')
-rw-r--r-- | adb/adb.cpp | 6 | ||||
-rw-r--r-- | adb/commandline.cpp | 6 | ||||
-rw-r--r-- | adb/sysdeps.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/adb/adb.cpp b/adb/adb.cpp index c09aee357..9f9e6bdfe 100644 --- a/adb/adb.cpp +++ b/adb/adb.cpp @@ -726,15 +726,15 @@ int handle_forward_request(const char* service, transport_type ttype, char* seri int createForward = strncmp(service, "kill", 4); int no_rebind = 0; - local = strchr(service, ':') + 1; + local = (char*) strchr(service, ':') + 1; // Handle forward:norebind:<local>... here if (createForward && !strncmp(local, "norebind:", 9)) { no_rebind = 1; - local = strchr(local, ':') + 1; + local = (char*) strchr(local, ':') + 1; } - remote = strchr(local,';'); + remote = (char*) strchr(local,';'); if (createForward) { // Check forward: parameter format: '<local>;<remote>' diff --git a/adb/commandline.cpp b/adb/commandline.cpp index 26eea2ff9..eb0c84b6f 100644 --- a/adb/commandline.cpp +++ b/adb/commandline.cpp @@ -463,7 +463,7 @@ static int adb_download_buffer(const char *service, const char *fn, const void* const uint8_t* ptr = reinterpret_cast<const uint8_t*>(data); if (show_progress) { - char *x = strrchr(service, ':'); + char *x = (char*) strrchr(service, ':'); if(x) service = x + 1; } @@ -1571,7 +1571,7 @@ static int install_app(transport_type transport, const char* serial, int argc, int last_apk = -1; for (i = argc - 1; i >= 0; i--) { const char* file = argv[i]; - char* dot = strrchr(file, '.'); + char* dot = (char*) strrchr(file, '.'); if (dot && !strcasecmp(dot, ".apk")) { if (stat(file, &sb) == -1 || !S_ISREG(sb.st_mode)) { fprintf(stderr, "Invalid APK file: %s\n", file); @@ -1617,7 +1617,7 @@ static int install_multiple_app(transport_type transport, const char* serial, in int first_apk = -1; for (i = argc - 1; i >= 0; i--) { const char* file = argv[i]; - char* dot = strrchr(file, '.'); + char* dot = (char*) strrchr(file, '.'); if (dot && !strcasecmp(dot, ".apk")) { if (stat(file, &sb) == -1 || !S_ISREG(sb.st_mode)) { fprintf(stderr, "Invalid APK file: %s\n", file); diff --git a/adb/sysdeps.h b/adb/sysdeps.h index 59e5b0b3d..3550a44c4 100644 --- a/adb/sysdeps.h +++ b/adb/sysdeps.h @@ -502,12 +502,12 @@ static __inline__ void adb_sysdeps_init(void) static __inline__ char* adb_dirstart(const char* path) { - return strchr(path, '/'); + return (char*) strrchr(path, '/'); } static __inline__ char* adb_dirstop(const char* path) { - return strrchr(path, '/'); + return (char*) strrchr(path, '/'); } static __inline__ int adb_is_absolute_host_path( const char* path ) |