From f4b0b7971c0333b7331c2f54384af5de0260ae75 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 6 Feb 2014 20:07:15 -0800 Subject: [PATCH] Fix logging errors inside ALOGV Fix errors exposed by adding checking to disabled ALOGVs. Change-Id: I36b77bb0ad8dc7661b0f834f20d1179b86134d57 --- libbacktrace/BacktraceMap.cpp | 3 ++- libziparchive/zip_archive.cc | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libbacktrace/BacktraceMap.cpp b/libbacktrace/BacktraceMap.cpp index 6320800cf..6eb290d01 100644 --- a/libbacktrace/BacktraceMap.cpp +++ b/libbacktrace/BacktraceMap.cpp @@ -93,7 +93,8 @@ bool BacktraceMap::ParseLine(const char* line, backtrace_map_t* map) { } ALOGV("Parsed map: start=%p, end=%p, flags=%x, name=%s", - map->start, map->end, map->flags, map->name.c_str()); + reinterpret_cast(map->start), reinterpret_cast(map->end), + map->flags, map->name.c_str()); return true; } diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc index a23d4ae0b..8ef096222 100644 --- a/libziparchive/zip_archive.cc +++ b/libziparchive/zip_archive.cc @@ -279,7 +279,7 @@ static int64_t EntryToIndex(const ZipEntryName* hash_table, ent = (ent + 1) & (hash_table_size - 1); } - ALOGV("Zip: Unable to find entry %.*s", name_length, name); + ALOGV("Zip: Unable to find entry %.*s", length, name); return kEntryNotFound; }