diff options
| author | Narayan Kamath <narayan@google.com> | 2014-02-24 11:05:02 +0000 |
|---|---|---|
| committer | Narayan Kamath <narayan@google.com> | 2014-02-24 11:05:02 +0000 |
| commit | 37e9570bce0ec5c08eab53935905f1e3a133dea2 (patch) | |
| tree | cfe25aecdd5c335ea85f54a8c525f7692a110b7f /libc/bionic/system_properties.cpp | |
| parent | c6d96bb8673a4f44d84f3beaa5ed4fec1484f0ad (diff) | |
| download | bionic-37e9570bce0ec5c08eab53935905f1e3a133dea2.zip bionic-37e9570bce0ec5c08eab53935905f1e3a133dea2.tar.gz bionic-37e9570bce0ec5c08eab53935905f1e3a133dea2.tar.bz2 | |
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
Diffstat (limited to 'libc/bionic/system_properties.cpp')
| -rw-r--r-- | libc/bionic/system_properties.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/bionic/system_properties.cpp b/libc/bionic/system_properties.cpp index 7c2f8dc..56f3724 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<off_t>(sizeof(prop_area))) ) { return -1; } |
