summaryrefslogtreecommitdiffstats
path: root/bin/sh/memalloc.h
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2013-04-01 17:18:22 +0000
committerjilles <jilles@FreeBSD.org>2013-04-01 17:18:22 +0000
commit3deb97fc0b145c3f68e924fbc0d4c173749860fd (patch)
tree9a5917477e371894a700d8481509e110a980c3bd /bin/sh/memalloc.h
parentf09dcb3ac2cf988f73865370bf0a644a3905b5b2 (diff)
downloadFreeBSD-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.h')
-rw-r--r--bin/sh/memalloc.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/sh/memalloc.h b/bin/sh/memalloc.h
index 425004e..95a6594 100644
--- a/bin/sh/memalloc.h
+++ b/bin/sh/memalloc.h
@@ -57,7 +57,7 @@ void setstackmark(struct stackmark *);
void popstackmark(struct stackmark *);
char *growstackstr(void);
char *makestrspace(int, char *);
-char *stputbin(const char *data, int len, char *p);
+char *stputbin(const char *data, size_t len, char *p);
char *stputs(const char *data, char *p);
@@ -67,7 +67,7 @@ char *stputs(const char *data, char *p);
#define grabstackblock(n) stalloc(n)
#define STARTSTACKSTR(p) p = stackblock()
#define STPUTC(c, p) do { if (p == sstrend) p = growstackstr(); *p++ = (c); } while(0)
-#define CHECKSTRSPACE(n, p) { if (sstrend - p < n) p = makestrspace(n, p); }
+#define CHECKSTRSPACE(n, p) { if ((size_t)(sstrend - p) < n) p = makestrspace(n, p); }
#define USTPUTC(c, p) (*p++ = (c))
/*
* STACKSTRNUL's use is where we want to be able to turn a stack
OpenPOWER on IntegriCloud