fix: convert signed integer types to unsigned in core and value modules to eliminate -Wsign-compare warnings
- Change `int` to `uint32_t` for iterator indices in `map_iterate` and `string_iterate` to match capacity/length types - Update `String.length` field type from `int` to `uint32_t` in `wren_utils.h` - Modify `wrenStringCodePointAt` parameter type from `int` to `uint32_t` and remove redundant negative index assertion - Convert loop variable in `markMap` from `int` to `uint32_t` to match `map->capacity` type - Add `-Wsign-compare`, `-Wtype-limits`, and `-Wuninitialized` compiler flags to catch future mismatches
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ HEADERS := include/wren.h $(wildcard src/*.h)
|
||||
SOURCES := $(wildcard src/*.c)
|
||||
BUILD_DIR := build
|
||||
|
||||
CFLAGS := -Wall -Werror
|
||||
CFLAGS := -Wall -Werror -Wsign-compare -Wtype-limits -Wuninitialized
|
||||
# TODO: Add -Wextra.
|
||||
|
||||
# Mode configuration.
|
||||
|
||||
Reference in New Issue
Block a user