mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 04:05:38 +00:00
Fix some usually disabled compiler warnings (#1286)
* Fixes from temporarily re-enabling more compiler warnings * More edits suggested by cppcheck * Fix hanging on append_yylval_string * Fix FOR loop increment
This commit is contained in:
1 parent
d179f3ed28
commit
66fd5a7062
13 files changed
+36
-31
No files matched your search
+1
-1
@@ -243,7 +243,7 @@ bool yywrap(void)
|
||||
// Avoid arithmetic overflow runtime error
|
||||
uint32_t forValue = (uint32_t)contextStack->forValue +
|
||||
(uint32_t)contextStack->forStep;
|
||||
contextStack->forValue = forValue >= 0 ? (int32_t)forValue
|
||||
contextStack->forValue = forValue <= INT32_MAX ? forValue
|
||||
: -(int32_t)~forValue - 1;
|
||||
struct Symbol *sym = sym_AddVar(contextStack->forName,
|
||||
contextStack->forValue);
|
||||
|
||||
Reference in new issue
Block a user