From 778af827248ad0d53316112684c3d83920a8c6e4 Mon Sep 17 00:00:00 2001 From: Bill Rossi Date: Sat, 8 Mar 2025 13:36:05 -0500 Subject: [PATCH] Clear some warnings --- level.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/level.c b/level.c index d1fb371..20df4fe 100644 --- a/level.c +++ b/level.c @@ -13,20 +13,25 @@ void init_level(Game *g, Level *l, char *filepath) { l->data_size = 0; do { l->data[l->data_size++] = atoi(datum); - } while (datum = strtok_r(NULL, ",", &other_guy)); + } while ((datum = strtok_r(NULL, ",", &other_guy))); l->width = l->data_size; - while (first_line = strtok_r(NULL, "\n", &line)) { + while ((first_line = strtok_r(NULL, "\n", &line))) { datum = strtok_r(first_line, ",", &other_guy); do { l->data[l->data_size++] = (char)atoi(datum); - } while (datum = strtok_r(NULL, ",", &other_guy)); + } while ((datum = strtok_r(NULL, ",", &other_guy))); } l->length = l->data_size / l->width; - printf("Loaded level from '%s': %dx%d = %d total bytes\n", filepath, l->length, l->width, l->data_size); + printf( + "Loaded level from '%s': %dx%d = %zd total bytes\n", + filepath, + l->length, + l->width, + l->data_size); UnloadFileText(file_text); - + l->game = g; }