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

Commit 14b61e7b authored by Tao Bao's avatar Tao Bao
Browse files

otautil: Clean up obsolete includes.

external/zlib and external/safe-iop/include were used by Zip.c, which
became obsolete after [1].

Removing
 - <assert.h>: we no longer call assert(3);
 - <limits.h>: we no longer use PATH_MAX;
 - <stdio.h>: we don't need FILE anymore;
 - <stdlib.h>: no more malloc(3)/calloc(3);
 - <unistd.h>: was once needed for lseek(2);
 - <string.h>: no more memset(3).

Adding
 - <stdint.h> for SIZE_MAX.

[1] commit 8cf5c8f6: "Replace minzip
with libziparchive".

Test: `mmma bootable/recovery`
Change-Id: I349e909ba83d0f6ade5f92856ce3934f29fdca6c
parent 52e2a97a
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -20,16 +20,10 @@ LOCAL_SRC_FILES := \
    DirUtil.cpp \
    ZipUtil.cpp

LOCAL_C_INCLUDES := \
    external/zlib \
    external/safe-iop/include

LOCAL_STATIC_LIBRARIES := libselinux libbase

LOCAL_MODULE := libotautil

LOCAL_CLANG := true

LOCAL_CFLAGS += -Werror -Wall

include $(BUILD_STATIC_LIBRARY)
+1 −6
Original line number Diff line number Diff line
@@ -16,17 +16,12 @@

#include "SysUtil.h"

#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>

#include <algorithm>
#include <string>