From 74e85e3a517b55e277f1a3d1fbb1e2f090620dba Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 3 Feb 2024 11:25:29 -0800 Subject: [PATCH] Fixed warning C4706: assignment within conditional expression --- test/testautomation_pen.c | 2 +- test/testime.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testautomation_pen.c b/test/testautomation_pen.c index 33b71275f..e0918def9 100644 --- a/test/testautomation_pen.c +++ b/test/testautomation_pen.c @@ -1342,7 +1342,7 @@ pen_movementAndAxes(void *arg) _pen_simulate_init(&ptest, simulated_pens, 2); /* Simulate pen movements */ - while ((last_action = _pen_simulate(steps, &sim_pc, &simulated_pens[0], 2))) { + while ((last_action = _pen_simulate(steps, &sim_pc, &simulated_pens[0], 2)) != 0) { int attempts = 0; SDL_Pen *simpen = &simulated_pens[last_action->pen_index]; SDL_PenID reported_which = 0; diff --git a/test/testime.c b/test/testime.c index 0e75e274a..003b3f19b 100644 --- a/test/testime.c +++ b/test/testime.c @@ -501,7 +501,7 @@ static void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))) != 0) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance; @@ -573,7 +573,7 @@ static void _Redraw(int rendererID) drawnTextRect.y = dstrect.y; drawnTextRect.h = dstrect.h; - while ((codepoint = utf8_decode(utext, len = utf8_length(*utext)))) { + while ((codepoint = utf8_decode(utext, len = utf8_length(*utext))) != 0) { Sint32 advance = unifont_draw_glyph(codepoint, rendererID, &dstrect) * UNIFONT_DRAW_SCALE; dstrect.x += advance; drawnTextRect.w += advance;