summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-01-06 08:14:11 -0800
committerMark Salyzyn <salyzyn@google.com>2014-01-27 15:15:05 -0800
commit168021c2827312e17a13d77b54f7d030a08b257b (patch)
tree2ab67d74fb83b56e4cf723ca8a0eb65858d4f8b0
parentd0a83fddf18de1a567692a0eeb43228601c83fcf (diff)
downloadsystem_core-168021c2827312e17a13d77b54f7d030a08b257b.zip
system_core-168021c2827312e17a13d77b54f7d030a08b257b.tar.gz
system_core-168021c2827312e17a13d77b54f7d030a08b257b.tar.bz2
liblog: resolve build warning messages
(cherry picked from commit 153b370624c3da0660281f692fbe3f2da96cfd70) Change-Id: Icc6f1f2c926a008efc4df71022cfde8d0e285880
-rw-r--r--include/log/uio.h6
-rw-r--r--liblog/fake_log_device.c10
-rw-r--r--liblog/uio.c10
3 files changed, 13 insertions, 13 deletions
diff --git a/include/log/uio.h b/include/log/uio.h
index 01a74d2..a71f515 100644
--- a/include/log/uio.h
+++ b/include/log/uio.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 The Android Open Source Project
+ * Copyright (C) 2007-2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ extern "C" {
#include <stddef.h>
struct iovec {
- const void* iov_base;
- size_t iov_len;
+ void* iov_base;
+ size_t iov_len;
};
extern int readv( int fd, struct iovec* vecs, int count );
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c
index 5283619..8d31060 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008 The Android Open Source Project
+ * Copyright (C) 2008-2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -320,11 +320,11 @@ static const char* getPriorityString(int priority)
* Make up something to replace it.
*/
static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) {
- int result = 0;
- struct iovec* end = iov + iovcnt;
+ ssize_t result = 0;
+ const struct iovec* end = iov + iovcnt;
for (; iov < end; iov++) {
- int w = write(fd, iov->iov_base, iov->iov_len);
- if (w != iov->iov_len) {
+ ssize_t w = write(fd, iov->iov_base, iov->iov_len);
+ if (w != (ssize_t) iov->iov_len) {
if (w < 0)
return w;
return result + w;
diff --git a/liblog/uio.c b/liblog/uio.c
index cfa4cb1..24a6507 100644
--- a/liblog/uio.c
+++ b/liblog/uio.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 The Android Open Source Project
+ * Copyright (C) 2007-2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,8 +24,8 @@ int readv( int fd, struct iovec* vecs, int count )
int total = 0;
for ( ; count > 0; count--, vecs++ ) {
- const char* buf = vecs->iov_base;
- int len = vecs->iov_len;
+ char* buf = vecs->iov_base;
+ int len = vecs->iov_len;
while (len > 0) {
int ret = read( fd, buf, len );
@@ -51,8 +51,8 @@ int writev( int fd, const struct iovec* vecs, int count )
int total = 0;
for ( ; count > 0; count--, vecs++ ) {
- const char* buf = (const char*)vecs->iov_base;
- int len = (int)vecs->iov_len;
+ const char* buf = vecs->iov_base;
+ int len = vecs->iov_len;
while (len > 0) {
int ret = write( fd, buf, len );