diff options
author | Craig Tiller <ctiller@google.com> | 2015-09-10 11:47:15 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-09-10 11:47:15 -0700 |
commit | 32ca48ce0b963949ff29d2dcd526b174679779aa (patch) | |
tree | e1203e29dbc0827fe4e9eed5737b3f1589d44f34 /src/core/support | |
parent | be947697d7c5edb1f67c9df5ef024e3eaf98e9e6 (diff) |
Core compiles with -Wsign-conversion
Diffstat (limited to 'src/core/support')
-rw-r--r-- | src/core/support/stack_lockfree.c | 2 | ||||
-rw-r--r-- | src/core/support/stack_lockfree.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/core/support/stack_lockfree.c b/src/core/support/stack_lockfree.c index 27ecf62280..0d4b4bedd9 100644 --- a/src/core/support/stack_lockfree.c +++ b/src/core/support/stack_lockfree.c @@ -79,7 +79,7 @@ struct gpr_stack_lockfree { #endif }; -gpr_stack_lockfree *gpr_stack_lockfree_create(int entries) { +gpr_stack_lockfree *gpr_stack_lockfree_create(size_t entries) { gpr_stack_lockfree *stack; stack = gpr_malloc(sizeof(*stack)); /* Since we only allocate 16 bits to represent an entry number, diff --git a/src/core/support/stack_lockfree.h b/src/core/support/stack_lockfree.h index eec960fbb0..2bbbe3bd95 100644 --- a/src/core/support/stack_lockfree.h +++ b/src/core/support/stack_lockfree.h @@ -34,11 +34,13 @@ #ifndef GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H #define GRPC_INTERNAL_CORE_SUPPORT_STACK_LOCKFREE_H +#include <stddef.h> + typedef struct gpr_stack_lockfree gpr_stack_lockfree; /* This stack must specify the maximum number of entries to track. The current implementation only allows up to 65534 entries */ -gpr_stack_lockfree* gpr_stack_lockfree_create(int entries); +gpr_stack_lockfree* gpr_stack_lockfree_create(size_t entries); void gpr_stack_lockfree_destroy(gpr_stack_lockfree* stack); /* Pass in a valid entry number for the next stack entry */ |