Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 129e9dad authored by Mark Salyzyn's avatar Mark Salyzyn Committed by Gerrit Code Review
Browse files

Merge changes Idfd1a114,If725a1cb,I61211165,If9a05ccb

* changes:
  adb: turn on -Werror
  netcfg: turn on -Werror
  mkbootimg: turn on -Werror
  gpttool: turn on -Werror
parents 803fb62b 60299dfd
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -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
@@ -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)))
@@ -160,8 +160,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

+1 −4
Original line number Diff line number Diff line
@@ -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);
+4 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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);
@@ -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);
+3 −3
Original line number Diff line number Diff line
@@ -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);
@@ -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));
+5 −6
Original line number Diff line number Diff line
@@ -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"

@@ -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];
@@ -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