am 5ff6da8c: am dbb93515: Merge "libcutils: Fix warnings in properties.c when verbose logging is enabled"
* commit '5ff6da8c6f1a9e3f2e1dbee080fb0fbc4b547ec4': libcutils: Fix warnings in properties.c when verbose logging is enabled
This commit is contained in:
commit
ab2a7dcef3
2 changed files with 6 additions and 4 deletions
|
|
@ -78,15 +78,16 @@ static intmax_t property_get_imax(const char *key, intmax_t lower_bound, intmax_
|
||||||
if ((result == INTMAX_MIN || result == INTMAX_MAX) && errno == ERANGE) {
|
if ((result == INTMAX_MIN || result == INTMAX_MAX) && errno == ERANGE) {
|
||||||
// Over or underflow
|
// Over or underflow
|
||||||
result = default_value;
|
result = default_value;
|
||||||
ALOGV("%s(%s,%lld) - overflow", __FUNCTION__, key, default_value);
|
ALOGV("%s(%s,%" PRIdMAX ") - overflow", __FUNCTION__, key, default_value);
|
||||||
} else if (result < lower_bound || result > upper_bound) {
|
} else if (result < lower_bound || result > upper_bound) {
|
||||||
// Out of range of requested bounds
|
// Out of range of requested bounds
|
||||||
result = default_value;
|
result = default_value;
|
||||||
ALOGV("%s(%s,%lld) - out of range", __FUNCTION__, key, default_value);
|
ALOGV("%s(%s,%" PRIdMAX ") - out of range", __FUNCTION__, key, default_value);
|
||||||
} else if (end == buf) {
|
} else if (end == buf) {
|
||||||
// Numeric conversion failed
|
// Numeric conversion failed
|
||||||
result = default_value;
|
result = default_value;
|
||||||
ALOGV("%s(%s,%lld) - numeric conversion failed", __FUNCTION__, key, default_value);
|
ALOGV("%s(%s,%" PRIdMAX ") - numeric conversion failed",
|
||||||
|
__FUNCTION__, key, default_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
errno = tmp;
|
errno = tmp;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@ test_src_files := \
|
||||||
PropertiesTest.cpp \
|
PropertiesTest.cpp \
|
||||||
|
|
||||||
shared_libraries := \
|
shared_libraries := \
|
||||||
libutils
|
libutils \
|
||||||
|
liblog
|
||||||
|
|
||||||
static_libraries := \
|
static_libraries := \
|
||||||
libcutils
|
libcutils
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue