diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-03-13 23:18:43 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-13 23:18:43 +0000 |
commit | c45011f27209d5d548be3f96f2a23f7ff7f48c4c (patch) | |
tree | 89f759817f6ca11ae4ed715a207e3f6aa37fa09b /cmds | |
parent | f4b08ebc61153afac8cab1e87ba015b142a394b6 (diff) | |
parent | cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba (diff) | |
download | frameworks_native-c45011f27209d5d548be3f96f2a23f7ff7f48c4c.zip frameworks_native-c45011f27209d5d548be3f96f2a23f7ff7f48c4c.tar.gz frameworks_native-c45011f27209d5d548be3f96f2a23f7ff7f48c4c.tar.bz2 |
am cdbf28b3: Merge "native frameworks: 64-bit compile issues"
* commit 'cdbf28b3f7f5327f4cb0eb95b8326bf4c24c87ba':
native frameworks: 64-bit compile issues
Diffstat (limited to 'cmds')
-rw-r--r-- | cmds/atrace/atrace.cpp | 5 | ||||
-rw-r--r-- | cmds/flatland/Composers.cpp | 4 | ||||
-rw-r--r-- | cmds/flatland/GLHelper.cpp | 2 | ||||
-rw-r--r-- | cmds/flatland/Main.cpp | 7 | ||||
-rw-r--r-- | cmds/installd/commands.c | 3 | ||||
-rw-r--r-- | cmds/installd/utils.c | 4 |
6 files changed, 14 insertions, 11 deletions
diff --git a/cmds/atrace/atrace.cpp b/cmds/atrace/atrace.cpp index b500a6b..34dc9fe 100644 --- a/cmds/atrace/atrace.cpp +++ b/cmds/atrace/atrace.cpp @@ -17,6 +17,7 @@ #include <errno.h> #include <fcntl.h> #include <getopt.h> +#include <inttypes.h> #include <signal.h> #include <stdarg.h> #include <stdbool.h> @@ -368,7 +369,7 @@ static bool pokeBinderServices() static bool setTagsProperty(uint64_t tags) { char buf[64]; - snprintf(buf, 64, "%#llx", tags); + snprintf(buf, 64, "%#" PRIx64, tags); if (property_set(k_traceTagsProperty, buf) < 0) { fprintf(stderr, "error setting trace tags system property\n"); return false; @@ -665,7 +666,7 @@ static void dumpTrace() close(traceFD); } -static void handleSignal(int signo) +static void handleSignal(int /*signo*/) { if (!g_nohup) { g_traceAborted = true; diff --git a/cmds/flatland/Composers.cpp b/cmds/flatland/Composers.cpp index 15cdb29..1173a81 100644 --- a/cmds/flatland/Composers.cpp +++ b/cmds/flatland/Composers.cpp @@ -122,12 +122,12 @@ public: virtual void tearDown() { } - virtual bool compose(GLuint texName, const sp<GLConsumer>& glc) { + virtual bool compose(GLuint /*texName*/, const sp<GLConsumer>& /*glc*/) { return true; } protected: - virtual bool setUp(GLHelper* helper) { + virtual bool setUp(GLHelper* /*helper*/) { return true; } diff --git a/cmds/flatland/GLHelper.cpp b/cmds/flatland/GLHelper.cpp index 42694b3..05d082b 100644 --- a/cmds/flatland/GLHelper.cpp +++ b/cmds/flatland/GLHelper.cpp @@ -332,7 +332,7 @@ static bool compileShader(GLenum shaderType, const char* src, static void printShaderSource(const char* const* src) { for (size_t i = 0; i < MAX_SHADER_LINES && src[i] != NULL; i++) { - fprintf(stderr, "%3d: %s\n", i+1, src[i]); + fprintf(stderr, "%3zu: %s\n", i+1, src[i]); } } diff --git a/cmds/flatland/Main.cpp b/cmds/flatland/Main.cpp index d6ac3d2..c0e5b3d 100644 --- a/cmds/flatland/Main.cpp +++ b/cmds/flatland/Main.cpp @@ -600,7 +600,7 @@ static bool runTest(const BenchmarkDesc b, size_t run) { uint32_t runHeight = b.runHeights[run]; uint32_t runWidth = b.width * runHeight / b.height; - printf(" %-*s | %4d x %4d | ", g_BenchmarkNameLen, b.name, + printf(" %-*s | %4d x %4d | ", static_cast<int>(g_BenchmarkNameLen), b.name, runWidth, runHeight); fflush(stdout); @@ -690,8 +690,9 @@ static void printResultsTableHeader() { size_t len = strlen(scenario); size_t leftPad = (g_BenchmarkNameLen - len) / 2; size_t rightPad = g_BenchmarkNameLen - len - leftPad; - printf(" %*s%s%*s | Resolution | Time (ms)\n", leftPad, "", - "Scenario", rightPad, ""); + printf(" %*s%s%*s | Resolution | Time (ms)\n", + static_cast<int>(leftPad), "", + "Scenario", static_cast<int>(rightPad), ""); } // Run ALL the benchmarks! diff --git a/cmds/installd/commands.c b/cmds/installd/commands.c index 10244ac..f1f6f99 100644 --- a/cmds/installd/commands.c +++ b/cmds/installd/commands.c @@ -14,6 +14,7 @@ ** limitations under the License. */ +#include <inttypes.h> #include <sys/capability.h> #include "installd.h" #include <diskusage/dirsize.h> @@ -157,7 +158,7 @@ int fix_uid(const char *pkgname, uid_t uid, gid_t gid) if (stat(pkgdir, &s) < 0) return -1; if (s.st_uid != 0 || s.st_gid != 0) { - ALOGE("fixing uid of non-root pkg: %s %lu %lu\n", pkgdir, s.st_uid, s.st_gid); + ALOGE("fixing uid of non-root pkg: %s %" PRIu32 " %" PRIu32 "\n", pkgdir, s.st_uid, s.st_gid); return -1; } diff --git a/cmds/installd/utils.c b/cmds/installd/utils.c index 0642330..8f4da65 100644 --- a/cmds/installd/utils.c +++ b/cmds/installd/utils.c @@ -435,7 +435,7 @@ static void _inc_num_cache_collected(cache_t* cache) { cache->numCollected++; if ((cache->numCollected%20000) == 0) { - ALOGI("Collected cache so far: %d directories, %d files", + ALOGI("Collected cache so far: %zd directories, %zd files", cache->numDirs, cache->numFiles); } } @@ -730,7 +730,7 @@ void clear_cache_files(cache_t* cache, int64_t free_size) int skip = 0; char path[PATH_MAX]; - ALOGI("Collected cache files: %d directories, %d files", + ALOGI("Collected cache files: %zd directories, %zd files", cache->numDirs, cache->numFiles); CACHE_NOISY(ALOGI("Sorting files...")); |