summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2018-04-27 00:26:25 +0200
committerandroid-build-merger <android-build-merger@google.com>2018-04-27 00:26:25 +0200
commita742fb0994454b7e80ca2867b170cf2c6096abc7 (patch)
tree670da6cc146ce288b595aff82ff74920482f33f8
parentMerge "sample_updater: create tools/gen_update_config.py" (diff)
parentMerge "Mark ui_print with __printflike." (diff)
downloadandroid_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar.gz
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar.bz2
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar.lz
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar.xz
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.tar.zst
android_bootable_recovery-a742fb0994454b7e80ca2867b170cf2c6096abc7.zip
-rw-r--r--common.h2
-rw-r--r--recovery.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/common.h b/common.h
index a85130698..4228e71de 100644
--- a/common.h
+++ b/common.h
@@ -40,7 +40,7 @@ extern const char* reason;
// fopen a file, mounting volumes and making parent dirs as necessary.
FILE* fopen_path(const std::string& path, const char* mode);
-void ui_print(const char* format, ...);
+void ui_print(const char* format, ...) __printflike(1, 2);
bool is_ro_debuggable();
diff --git a/recovery.cpp b/recovery.cpp
index dbbac7a7d..7c8374460 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -1296,7 +1296,7 @@ static bool is_battery_ok() {
charge_status != android::BATTERY_STATUS_NOT_CHARGING);
android::BatteryProperty capacity;
android::status_t status = monitor.getProperty(android::BATTERY_PROP_CAPACITY, &capacity);
- ui_print("charge_status %d, charged %d, status %d, capacity %lld\n", charge_status,
+ ui_print("charge_status %d, charged %d, status %d, capacity %" PRId64 "\n", charge_status,
charged, status, capacity.valueInt64);
// At startup, the battery drivers in devices like N5X/N6P take some time to load
// the battery profile. Before the load finishes, it reports value 50 as a fake