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

Commit ae70ebff authored by Yi Kong's avatar Yi Kong
Browse files

Fix -Wformat warning

frameworks/base/core/jni/com_android_internal_content_FileSystemUtils.cpp:198:37: error: format specifies type 'long' but the argument has type 'int' [-Werror,-Wformat]
  196 |         ALOGD("Size after punching holes st_blocks: %" PRIu64 ", st_blksize: %ld, st_size: %" PRIu64
      |                                                                              ~~~
      |                                                                              %d
  197 |               "",
  198 |               afterPunch.st_blocks, afterPunch.st_blksize,
      |                                     ^~~~~~~~~~~~~~~~~~~~~

Test: presubmit
Bug: 315250603
Change-Id: I449937f824ef7423d2c909a64b34d4df678ac62b
parent 53c4d136
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ bool punchHoles(const char *filePath, const uint64_t offset,
        ALOGD("Total number of LOAD segments %zu", programHeaders.size());

        ALOGD("Size before punching holes st_blocks: %" PRIu64
              ", st_blksize: %ld, st_size: %" PRIu64 "",
              ", st_blksize: %d, st_size: %" PRIu64 "",
              beforePunch.st_blocks, beforePunch.st_blksize,
              static_cast<uint64_t>(beforePunch.st_size));
    }
@@ -193,7 +193,7 @@ bool punchHoles(const char *filePath, const uint64_t offset,
            ALOGD("lstat64 failed for filePath %s, error:%d", filePath, errno);
            return false;
        }
        ALOGD("Size after punching holes st_blocks: %" PRIu64 ", st_blksize: %ld, st_size: %" PRIu64
        ALOGD("Size after punching holes st_blocks: %" PRIu64 ", st_blksize: %d, st_size: %" PRIu64
              "",
              afterPunch.st_blocks, afterPunch.st_blksize,
              static_cast<uint64_t>(afterPunch.st_size));
@@ -271,7 +271,7 @@ bool punchHolesInZip(const char *filePath, uint64_t offset, uint16_t extraFieldL
    uint64_t blockSize = beforePunch.st_blksize;
    IF_ALOGD() {
        ALOGD("Extra field length: %hu,  Size before punching holes st_blocks: %" PRIu64
              ", st_blksize: %ld, st_size: %" PRIu64 "",
              ", st_blksize: %d, st_size: %" PRIu64 "",
              extraFieldLen, beforePunch.st_blocks, beforePunch.st_blksize,
              static_cast<uint64_t>(beforePunch.st_size));
    }
@@ -346,7 +346,7 @@ bool punchHolesInZip(const char *filePath, uint64_t offset, uint16_t extraFieldL
            return false;
        }
        ALOGD("punchHolesInApk:: Size after punching holes st_blocks: %" PRIu64
              ", st_blksize: %ld, st_size: %" PRIu64 "",
              ", st_blksize: %d, st_size: %" PRIu64 "",
              afterPunch.st_blocks, afterPunch.st_blksize,
              static_cast<uint64_t>(afterPunch.st_size));
    }