diff options
-rw-r--r-- | jim-aio.c | 2 | ||||
-rw-r--r-- | jim-signal.c | 4 | ||||
-rw-r--r-- | jim-tty.c | 4 | ||||
-rw-r--r-- | jim.c | 4 | ||||
-rw-r--r-- | jim.h | 2 | ||||
-rw-r--r-- | utf8.c | 2 |
6 files changed, 9 insertions, 9 deletions
@@ -224,7 +224,7 @@ static int ssl_reader(struct AioFile *af, char *buf, int len) static const char *ssl_getline(struct AioFile *af, char *buf, int len) { - int i; + size_t i; for (i = 0; i < len + 1; i++) { if (SSL_read(af->ssl, &buf[i], 1) != 1) { if (i == 0) { diff --git a/jim-signal.c b/jim-signal.c index 5fb9c9f..cec541a 100644 --- a/jim-signal.c +++ b/jim-signal.c @@ -16,9 +16,9 @@ #define MAX_SIGNALS_WIDE (sizeof(jim_wide) * 8) #if defined(NSIG) - #define MAX_SIGNALS ((NSIG < MAX_SIGNALS_WIDE) ? NSIG : MAX_SIGNALS_WIDE) + #define MAX_SIGNALS (int)((NSIG < MAX_SIGNALS_WIDE) ? NSIG : MAX_SIGNALS_WIDE) #else - #define MAX_SIGNALS MAX_SIGNALS_WIDE + #define MAX_SIGNALS (int)MAX_SIGNALS_WIDE #endif static jim_wide *sigloc; @@ -146,7 +146,7 @@ static void JimListAddPair(Jim_Interp *interp, Jim_Obj *listObjPtr, const char * Jim_Obj *Jim_GetTtySettings(Jim_Interp *interp, int fd) { struct termios tio; - int i; + size_t i; const char *p; Jim_Obj *listObjPtr; speed_t speed; @@ -215,7 +215,7 @@ int Jim_SetTtySettings(Jim_Interp *interp, int fd, Jim_Obj *dictObjPtr) int opt; const struct flag_name_map *p; long l; - int j; + size_t j; if (Jim_GetEnum(interp, nameObj, tty_settings_names, &opt, "setting", JIM_ERRMSG | JIM_ENUM_ABBREV) != JIM_OK) { return JIM_ERR; @@ -5381,11 +5381,11 @@ int Jim_Collect(Jim_Interp *interp) Jim_Obj *objPtr; /* Avoid recursive calls */ - if (interp->lastCollectId == -1) { + if (interp->lastCollectId == (unsigned long)~0) { /* Jim_Collect() already running. Return just now. */ return 0; } - interp->lastCollectId = -1; + interp->lastCollectId = ~0; /* Mark all the references found into the 'mark' hash table. * The references are searched in every live object that @@ -535,7 +535,7 @@ typedef struct Jim_Interp { unsigned long referenceNextId; /* Next id for reference. */ struct Jim_HashTable references; /* References hash table. */ unsigned long lastCollectId; /* reference max Id of the last GC - execution. It's set to -1 while the collection + execution. It's set to ~0 while the collection is running as sentinel to avoid to recursive calls via the [collect] command inside finalizers. */ @@ -199,7 +199,7 @@ static int utf8_map_case(const struct casemap *mapping, int num, int ch) static int cmp_range(const void *key, const void *cm) { const struct utf8range *range = (const struct utf8range *)cm; - int ch = *(int *)key; + unsigned ch = *(unsigned *)key; if (ch < range->lower) { return -1; } |