From 37e9570bce0ec5c08eab53935905f1e3a133dea2 Mon Sep 17 00:00:00 2001 From: Narayan Kamath Date: Mon, 24 Feb 2014 11:05:02 +0000 Subject: [PATCH] Fix 64-bit build. A warning about signed vs unsigned comparison was converted into an error here : ... struct stat st; if (st.st_size > sizeof(prop_area) { ... st_size is either an off64_t, which is a signed type. It's worth investigating why this didn't trigger a warning on 32 bit, where it's signed as well. Change-Id: Ib2622bd5c444ddcfa7fb2141f00332cbb4a0818b --- libc/bionic/system_properties.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp index 7c2f8dc4f..56f3724c4 100644 --- a/libc/bionic/system_properties.cpp +++ b/libc/bionic/system_properties.cpp @@ -238,7 +238,7 @@ static int map_fd_ro(const int fd) { if ((fd_stat.st_uid != 0) || (fd_stat.st_gid != 0) || ((fd_stat.st_mode & (S_IWGRP | S_IWOTH)) != 0) - || (fd_stat.st_size < sizeof(prop_area)) ) { + || (fd_stat.st_size < static_cast(sizeof(prop_area))) ) { return -1; }