diff options
author | jilles <jilles@FreeBSD.org> | 2013-04-01 17:18:22 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2013-04-01 17:18:22 +0000 |
commit | 3deb97fc0b145c3f68e924fbc0d4c173749860fd (patch) | |
tree | 9a5917477e371894a700d8481509e110a980c3bd /bin/sh/memalloc.c | |
parent | f09dcb3ac2cf988f73865370bf0a644a3905b5b2 (diff) | |
download | FreeBSD-src-3deb97fc0b145c3f68e924fbc0d4c173749860fd.zip FreeBSD-src-3deb97fc0b145c3f68e924fbc0d4c173749860fd.tar.gz |
sh: Fix various compiler warnings.
It now passes WARNS=7 with clang on i386.
GCC 4.2.1 does not understand setjmp() properly so will always trigger
-Wuninitialized. I will not add the volatile keywords to suppress this.
Diffstat (limited to 'bin/sh/memalloc.c')
-rw-r--r-- | bin/sh/memalloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/sh/memalloc.c b/bin/sh/memalloc.c index bc567d0..f33a15c 100644 --- a/bin/sh/memalloc.c +++ b/bin/sh/memalloc.c @@ -233,7 +233,8 @@ growstackblock(int min) if (min < stacknleft) min = stacknleft; - if (min >= INT_MAX / 2 - ALIGN(sizeof(struct stack_block))) + if ((unsigned int)min >= + INT_MAX / 2 - ALIGN(sizeof(struct stack_block))) error("Out of space"); min += stacknleft; min += ALIGN(sizeof(struct stack_block)); @@ -327,7 +328,7 @@ makestrspace(int min, char *p) char * -stputbin(const char *data, int len, char *p) +stputbin(const char *data, size_t len, char *p) { CHECKSTRSPACE(len, p); memcpy(p, data, len); |