diff options
author | David Mosberger-Tang <davidm@panda.mostang.com> | 2007-08-22 12:57:49 -0600 |
---|---|---|
committer | David Mosberger-Tang <davidm@panda.mostang.com> | 2007-08-22 12:57:49 -0600 |
commit | 03e05b41386fd5797cb8cd62eff7f0ba77c4e07e (patch) | |
tree | dc61e08efdf97ef8305f0f0d4ab378d2e3c08258 | |
parent | 75f34ccb7dcdfd2b96e370824b3fd723b2f22b49 (diff) | |
download | libunwind-03e05b41386fd5797cb8cd62eff7f0ba77c4e07e.tar.gz |
Fix two minor compiler-warnings.
-rw-r--r-- | src/os-linux.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/os-linux.h b/src/os-linux.h index 6a2b7dd7..57c57231 100644 --- a/src/os-linux.h +++ b/src/os-linux.h @@ -1,6 +1,7 @@ /* libunwind - a platform-independent unwind library Copyright (C) 2003-2004 Hewlett-Packard Co - Contributed by David Mosberger-Tang <davidm@hpl.hp.com> + Copyright (C) 2007 David Mosberger-Tang + Contributed by David Mosberger-Tang <dmosberger@gmail.com> This file is part of libunwind. @@ -71,6 +72,7 @@ maps_init (struct map_iterator *mi, pid_t pid) mi->fd = open (path, O_RDONLY); mi->offset = 0; + mi->buf_size = 0; cp = NULL; if (mi->fd >= 0) @@ -233,7 +235,7 @@ maps_next (struct map_iterator *mi, mi->buf_size - bytes_left); if (nread <= 0) return 0; - else if (nread + bytes_left < mi->buf_size) + else if ((size_t) (nread + bytes_left) < mi->buf_size) { /* Move contents to the end of the buffer so we maintain the invariant that all bytes between |