Make the code compile with warnings-as-errors.

-Wextra found a bona-fide bug: signed/unsigned comparison in a
stack overflow check.
This commit is contained in:
Stephen Dolan committed 2012-09-17 22:04:58 +01:00
1 parent eab9c4e587
commit cbdeddbab8
6 files changed
+7 -8

No files matched your search

+2 -1
View File
@@ -53,7 +53,8 @@ static void forkable_stack_free(struct forkable_stack* s) {
s->stk = 0;
}
static void* forkable_stack_push(struct forkable_stack* s, size_t size) {
static void* forkable_stack_push(struct forkable_stack* s, size_t sz_size) {
int size = (int)sz_size;
forkable_stack_check(s);
int curr = s->pos < s->savedlimit ? s->pos : s->savedlimit;
if (curr - size < 0) {