summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorMark Salyzyn2014-01-06 10:14:11 -0600
committerMark Salyzyn2014-01-27 17:15:05 -0600
commit168021c2827312e17a13d77b54f7d030a08b257b (patch)
tree2ab67d74fb83b56e4cf723ca8a0eb65858d4f8b0 /liblog
parentd0a83fddf18de1a567692a0eeb43228601c83fcf (diff)
downloadplatform-system-core-168021c2827312e17a13d77b54f7d030a08b257b.tar.gz
platform-system-core-168021c2827312e17a13d77b54f7d030a08b257b.tar.xz
platform-system-core-168021c2827312e17a13d77b54f7d030a08b257b.zip
liblog: resolve build warning messages
(cherry picked from commit 153b370624c3da0660281f692fbe3f2da96cfd70) Change-Id: Icc6f1f2c926a008efc4df71022cfde8d0e285880
Diffstat (limited to 'liblog')
-rw-r--r--liblog/fake_log_device.c10
-rw-r--r--liblog/uio.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/liblog/fake_log_device.c b/liblog/fake_log_device.c
index 528361986..8d3106056 100644
--- a/liblog/fake_log_device.c
+++ b/liblog/fake_log_device.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2008 The Android Open Source Project 2 * Copyright (C) 2008-2014 The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * you may not use this file except in compliance with the License.
@@ -320,11 +320,11 @@ static const char* getPriorityString(int priority)
320 * Make up something to replace it. 320 * Make up something to replace it.
321 */ 321 */
322static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) { 322static ssize_t fake_writev(int fd, const struct iovec *iov, int iovcnt) {
323 int result = 0; 323 ssize_t result = 0;
324 struct iovec* end = iov + iovcnt; 324 const struct iovec* end = iov + iovcnt;
325 for (; iov < end; iov++) { 325 for (; iov < end; iov++) {
326 int w = write(fd, iov->iov_base, iov->iov_len); 326 ssize_t w = write(fd, iov->iov_base, iov->iov_len);
327 if (w != iov->iov_len) { 327 if (w != (ssize_t) iov->iov_len) {
328 if (w < 0) 328 if (w < 0)
329 return w; 329 return w;
330 return result + w; 330 return result + w;
diff --git a/liblog/uio.c b/liblog/uio.c
index cfa4cb122..24a65075f 100644
--- a/liblog/uio.c
+++ b/liblog/uio.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007 The Android Open Source Project 2 * Copyright (C) 2007-2014 The Android Open Source Project
3 * 3 *
4 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License. 5 * 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 )
24 int total = 0; 24 int total = 0;
25 25
26 for ( ; count > 0; count--, vecs++ ) { 26 for ( ; count > 0; count--, vecs++ ) {
27 const char* buf = vecs->iov_base; 27 char* buf = vecs->iov_base;
28 int len = vecs->iov_len; 28 int len = vecs->iov_len;
29 29
30 while (len > 0) { 30 while (len > 0) {
31 int ret = read( fd, buf, len ); 31 int ret = read( fd, buf, len );
@@ -51,8 +51,8 @@ int writev( int fd, const struct iovec* vecs, int count )
51 int total = 0; 51 int total = 0;
52 52
53 for ( ; count > 0; count--, vecs++ ) { 53 for ( ; count > 0; count--, vecs++ ) {
54 const char* buf = (const char*)vecs->iov_base; 54 const char* buf = vecs->iov_base;
55 int len = (int)vecs->iov_len; 55 int len = vecs->iov_len;
56 56
57 while (len > 0) { 57 while (len > 0) {
58 int ret = write( fd, buf, len ); 58 int ret = write( fd, buf, len );