Fix some warnings produced by different compilers. (GH-5593) (GH-5600)

(cherry picked from commit bfe4fd5f2e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-02-09 07:56:34 -08:00 committed by Serhiy Storchaka
parent 3a047a781a
commit 7df80492fc
6 changed files with 19 additions and 7 deletions

View file

@ -8,7 +8,7 @@
#define CONTEXT_FREELIST_MAXLEN 255
static PyContext *ctx_freelist = NULL;
static Py_ssize_t ctx_freelist_len = 0;
static int ctx_freelist_len = 0;
#include "clinic/context.c.h"
@ -1177,7 +1177,7 @@ get_token_missing(void)
int
PyContext_ClearFreeList(void)
{
Py_ssize_t size = ctx_freelist_len;
int size = ctx_freelist_len;
while (ctx_freelist_len) {
PyContext *ctx = ctx_freelist;
ctx_freelist = (PyContext *)ctx->ctx_weakreflist;