Loading adb/Android.mk +3 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ else LOCAL_SRC_FILES += fdevent.c endif LOCAL_CFLAGS += -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter -Werror LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE LOCAL_MODULE := adb LOCAL_MODULE_TAGS := debug Loading Loading @@ -116,7 +116,7 @@ LOCAL_SRC_FILES := \ remount_service.c \ usb_linux_client.c LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter -Werror LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) Loading Loading @@ -162,8 +162,7 @@ LOCAL_CFLAGS := \ -g \ -DADB_HOST=1 \ -DADB_HOST_ON_TARGET=1 \ -Wall \ -Wno-unused-parameter \ -Wall -Wno-unused-parameter -Werror \ -D_XOPEN_SOURCE \ -D_GNU_SOURCE Loading adb/backup_service.c +1 −4 Original line number Diff line number Diff line Loading @@ -52,15 +52,12 @@ int backup_service(BackupOperation op, char* args) { pid_t pid; int s[2]; char* operation; int socketnum; // Command string and choice of stdin/stdout for the pipe depend on our invocation // Command string depends on our invocation if (op == BACKUP) { operation = "backup"; socketnum = STDOUT_FILENO; } else { operation = "restore"; socketnum = STDIN_FILENO; } D("backup_service(%s, %s)\n", operation, args); Loading adb/commandline.c +4 −4 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ int adb_download_buffer(const char *service, const char *fn, const void* data, i } int opt = CHUNK_SIZE; opt = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt)); opt = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (const void *) &opt, sizeof(opt)); total = sz; ptr = data; Loading Loading @@ -681,10 +681,10 @@ static int logcat(transport_type transport, char* serial, int argc, char **argv) return 0; } static int mkdirs(char *path) static int mkdirs(const char *path) { int ret; char *x = path + 1; char *x = (char *)path + 1; for(;;) { x = adb_dirstart(x); Loading Loading @@ -727,7 +727,7 @@ static int backup(int argc, char** argv) { if (argc < 2) return usage(); adb_unlink(filename); mkdirs((char *)filename); mkdirs(filename); outFd = adb_creat(filename, 0640); if (outFd < 0) { fprintf(stderr, "adb: unable to open file %s\n", filename); Loading adb/file_sync_client.c +3 −3 Original line number Diff line number Diff line Loading @@ -456,10 +456,10 @@ fail: return -1; } static int mkdirs(char *name) static int mkdirs(const char *name) { int ret; char *x = name + 1; char *x = (char *)name + 1; for(;;) { x = adb_dirstart(x); Loading Loading @@ -521,7 +521,7 @@ int sync_recv(int fd, const char *rpath, const char *lpath, int show_progress) if((id == ID_DATA) || (id == ID_DONE)) { adb_unlink(lpath); mkdirs((char *)lpath); mkdirs(lpath); lfd = adb_creat(lpath, 0644); if(lfd < 0) { fprintf(stderr,"cannot create '%s': %s\n", lpath, strerror(errno)); Loading adb/remount_service.c +5 −6 Original line number Diff line number Diff line Loading @@ -14,13 +14,13 @@ * limitations under the License. */ #include <stdlib.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/mount.h> #include <errno.h> #include <unistd.h> #include "sysdeps.h" Loading @@ -35,7 +35,6 @@ static char *find_mount(const char *dir) { int fd; int res; int size; char *token = NULL; const char delims[] = "\n"; char buf[4096]; Loading @@ -45,7 +44,7 @@ static char *find_mount(const char *dir) return NULL; buf[sizeof(buf) - 1] = '\0'; size = adb_read(fd, buf, sizeof(buf) - 1); adb_read(fd, buf, sizeof(buf) - 1); adb_close(fd); token = strtok(buf, delims); Loading Loading
adb/Android.mk +3 −4 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ else LOCAL_SRC_FILES += fdevent.c endif LOCAL_CFLAGS += -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter LOCAL_CFLAGS += -O2 -g -DADB_HOST=1 -Wall -Wno-unused-parameter -Werror LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE LOCAL_MODULE := adb LOCAL_MODULE_TAGS := debug Loading Loading @@ -116,7 +116,7 @@ LOCAL_SRC_FILES := \ remount_service.c \ usb_linux_client.c LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter LOCAL_CFLAGS := -O2 -g -DADB_HOST=0 -Wall -Wno-unused-parameter -Werror LOCAL_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) Loading Loading @@ -162,8 +162,7 @@ LOCAL_CFLAGS := \ -g \ -DADB_HOST=1 \ -DADB_HOST_ON_TARGET=1 \ -Wall \ -Wno-unused-parameter \ -Wall -Wno-unused-parameter -Werror \ -D_XOPEN_SOURCE \ -D_GNU_SOURCE Loading
adb/backup_service.c +1 −4 Original line number Diff line number Diff line Loading @@ -52,15 +52,12 @@ int backup_service(BackupOperation op, char* args) { pid_t pid; int s[2]; char* operation; int socketnum; // Command string and choice of stdin/stdout for the pipe depend on our invocation // Command string depends on our invocation if (op == BACKUP) { operation = "backup"; socketnum = STDOUT_FILENO; } else { operation = "restore"; socketnum = STDIN_FILENO; } D("backup_service(%s, %s)\n", operation, args); Loading
adb/commandline.c +4 −4 Original line number Diff line number Diff line Loading @@ -406,7 +406,7 @@ int adb_download_buffer(const char *service, const char *fn, const void* data, i } int opt = CHUNK_SIZE; opt = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &opt, sizeof(opt)); opt = setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (const void *) &opt, sizeof(opt)); total = sz; ptr = data; Loading Loading @@ -681,10 +681,10 @@ static int logcat(transport_type transport, char* serial, int argc, char **argv) return 0; } static int mkdirs(char *path) static int mkdirs(const char *path) { int ret; char *x = path + 1; char *x = (char *)path + 1; for(;;) { x = adb_dirstart(x); Loading Loading @@ -727,7 +727,7 @@ static int backup(int argc, char** argv) { if (argc < 2) return usage(); adb_unlink(filename); mkdirs((char *)filename); mkdirs(filename); outFd = adb_creat(filename, 0640); if (outFd < 0) { fprintf(stderr, "adb: unable to open file %s\n", filename); Loading
adb/file_sync_client.c +3 −3 Original line number Diff line number Diff line Loading @@ -456,10 +456,10 @@ fail: return -1; } static int mkdirs(char *name) static int mkdirs(const char *name) { int ret; char *x = name + 1; char *x = (char *)name + 1; for(;;) { x = adb_dirstart(x); Loading Loading @@ -521,7 +521,7 @@ int sync_recv(int fd, const char *rpath, const char *lpath, int show_progress) if((id == ID_DATA) || (id == ID_DONE)) { adb_unlink(lpath); mkdirs((char *)lpath); mkdirs(lpath); lfd = adb_creat(lpath, 0644); if(lfd < 0) { fprintf(stderr,"cannot create '%s': %s\n", lpath, strerror(errno)); Loading
adb/remount_service.c +5 −6 Original line number Diff line number Diff line Loading @@ -14,13 +14,13 @@ * limitations under the License. */ #include <stdlib.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <sys/mount.h> #include <errno.h> #include <unistd.h> #include "sysdeps.h" Loading @@ -35,7 +35,6 @@ static char *find_mount(const char *dir) { int fd; int res; int size; char *token = NULL; const char delims[] = "\n"; char buf[4096]; Loading @@ -45,7 +44,7 @@ static char *find_mount(const char *dir) return NULL; buf[sizeof(buf) - 1] = '\0'; size = adb_read(fd, buf, sizeof(buf) - 1); adb_read(fd, buf, sizeof(buf) - 1); adb_close(fd); token = strtok(buf, delims); Loading