sm8450-common: gpt-utils: Address the warnings

[ 11% 2/18] target  C++: libgptutils <= device/google/crosshatch/gpt-utils/gpt-utils.cpp
In file included from device/google/crosshatch/gpt-utils/gpt-utils.cpp:54:
system/core/libcutils/include_vndk/cutils/log.h:38:2: warning: "Deprecated: don't include cutils/log.h, use either android/log.h or log/log.h" [-W#warnings]
 ^
device/google/crosshatch/gpt-utils/gpt-utils.cpp:750:17: warning: unused variable 'ufs_dir_stat' [-Wunused-variable]
    struct stat ufs_dir_stat;
                ^
device/google/crosshatch/gpt-utils/gpt-utils.cpp:973:13: warning: unused variable 'r' [-Wunused-variable]
        int r, fd;
            ^
device/google/crosshatch/gpt-utils/gpt-utils.cpp:973:16: warning: unused variable 'fd' [-Wunused-variable]
        int r, fd;
               ^
4 warnings generated.

Test: lunch blueline-userdebug && m -j libgptutils
Change-Id: Idd9174276d8a5b7b77c2ec48c745a78184f65fcf
This commit is contained in:
Tao Bao 2018-06-08 13:11:57 -07:00 committed by Arian
parent c6f0e6bd0b
commit fefc40993e

View file

@ -717,7 +717,6 @@ int prepare_partitions(enum boot_update_stage stage, const char *dev_path)
enum gpt_state gpt_prim, gpt_second;
enum boot_update_stage internal_stage;
struct stat xbl_partition_stat;
struct stat ufs_dir_stat;
if (!dev_path) {
fprintf(stderr, "%s: Invalid dev_path\n",
@ -940,7 +939,6 @@ int add_lun_to_update_list(char *lun_path, struct update_data *dat)
int prepare_boot_update(enum boot_update_stage stage)
{
int r, fd;
int is_ufs = gpt_utils_is_ufs_device();
struct stat ufs_dir_stat;
struct update_data data;