diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-14 19:24:12 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-14 19:24:12 +0000 |
commit | 88cf9cfc0f99dd3d3384436f123e7b44e75edbd0 (patch) | |
tree | e49c1563192a6799e204ea35e0c9ad791f7c1110 /test | |
parent | 57f8f41db1e4f78d7fb21a67845e1a9c0a077b3e (diff) | |
download | libapr-88cf9cfc0f99dd3d3384436f123e7b44e75edbd0.tar.gz |
Solve two int-size issues on some platforms; exit is well defined
to return an (int) while on some platforms read/write is still
expressed as unsigned int bytes of data. Both harmless truncations.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@584587 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/proc_child.c | 6 | ||||
-rw-r--r-- | test/sockchild.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/test/proc_child.c b/test/proc_child.c index 405bb7f5b..6cfc8fc9f 100644 --- a/test/proc_child.c +++ b/test/proc_child.c @@ -11,11 +11,11 @@ int main(void) { char buf[256]; - apr_ssize_t bytes; + int bytes; - bytes = read(STDIN_FILENO, buf, 256); + bytes = (int)read(STDIN_FILENO, buf, 256); if (bytes > 0) - write(STDOUT_FILENO, buf, bytes); + write(STDOUT_FILENO, buf, (unsigned int)bytes); return 0; /* just to keep the compiler happy */ } diff --git a/test/sockchild.c b/test/sockchild.c index 5c15d113f..3803d00af 100644 --- a/test/sockchild.c +++ b/test/sockchild.c @@ -67,14 +67,14 @@ int main(int argc, char *argv[]) exit(-1); } - exit(length); + exit((int)length); } else if (!strcmp("write", argv[1])) { apr_size_t length = strlen(DATASTR); apr_socket_send(sock, DATASTR, &length); apr_socket_close(sock); - exit(length); + exit((int)length); } exit(-1); } |