Conversation
…ts; update dependencies - LVGL is built with CONFIG_LV_USE_CUSTOM_MALLOC: components/box-emu/src/lvgl_mem.c allocates from the PSRAM heap (falling back to internal RAM only if PSRAM is exhausted) instead of a fixed pool in internal RAM, and reports the PSRAM heap to lv_mem_monitor(). - The uSD card is managed by espp::SdCard (card initialization and FAT mounting as separate steps), replacing the hand-rolled SDSPI + esp_vfs_fat_sdspi_mount code. - USB mass storage uses espp::UsbDevice's MSC function: the card's volume is unmounted from the application and handed to the host while USB is enabled; if the host ejects the drive the card is mounted for the application again. Disabling USB stops the stack, reconnects the USB-Serial-JTAG console and mounts the card. This replaces the raw TinyUSB descriptors and tinyusb_msc storage code (and the uninitialized JTAG PHY handle that was passed to usb_del_phy()). - Dependencies: espp components 1.1.x -> >=1.3.4 (adding espp/sdcard and espp/usb_device), lvgl >=9.6.0, esp_tinyusb >=2.3.0 / tinyusb 0.21 (pulled in by usb_device). espressif/usb is no longer a dependency (the USB PHY API comes from esp_hw_support). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AWhoGwibqcKDhcG17mjVT1
|
⚡ Static analysis result ⚡ 🔴 cppcheck found 209 issues! Click here to see details.esp-box-emu/components/darkforces/src/platform/esp_render.cpp Lines 106 to 111 in 46f5181 !Line: 106 - style: Parameter 'mem' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_render.cpp Lines 163 to 168 in 46f5181 !Line: 163 - style: Parameter 'color' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_render.cpp Lines 227 to 232 in 46f5181 !Line: 227 - style: Parameter 'texture' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_thread.cpp Lines 33 to 38 in 46f5181 !Line: 33 - performance: Variable 'm_done' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
esp-box-emu/components/darkforces/src/platform/esp_thread.cpp Lines 21 to 26 in 46f5181 !Line: 21 - style: inconclusive: Either there is a missing 'override', or the member function 'ThreadEsp::getFunc' can be const. [functionConst]
esp-box-emu/components/darkforces/src/platform/esp_thread.cpp Lines 19 to 24 in 46f5181 !Line: 19 - style: Virtual function 'waitOnExit' is called from destructor '~ThreadEsp()' at line 40. Dynamic binding is not used. [virtualCallInConstructor]
!Line: 40 - note: Calling waitOnExit
!Line: 19 - note: waitOnExit is a virtual functionesp-box-emu/components/darkforces/src/platform/esp_platform.h Lines 6 to 11 in 46f5181 !Line: 6 - error: Code 'namespaceTFE_Memory{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 284 to 289 in 46f5181 !Line: 284 - style: Parameter 'region' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 284 to 289 in 46f5181 !Line: 284 - style: Parameter 'ptr' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 289 to 294 in 46f5181 !Line: 289 - style: Parameter 'region' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 294 to 299 in 46f5181 !Line: 294 - style: Parameter 'region' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 294 to 299 in 46f5181 !Line: 294 - style: Parameter 'file' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 299 to 304 in 46f5181 !Line: 299 - style: Parameter 'region' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_memory.cpp Lines 299 to 304 in 46f5181 !Line: 299 - style: Parameter 'file' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 166 to 171 in 46f5181 !Line: 166 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 174 to 179 in 46f5181 !Line: 174 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 53 to 58 in 46f5181 !Line: 53 - style: Parameter 'game' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 87 to 92 in 46f5181 !Line: 87 - style: Parameter 'var' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 88 to 93 in 46f5181 !Line: 88 - style: Parameter 'var' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 89 to 94 in 46f5181 !Line: 89 - style: Parameter 'var' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 90 to 95 in 46f5181 !Line: 90 - style: Parameter 'var' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 161 to 166 in 46f5181 !Line: 161 - style: Parameter 'image' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 177 to 182 in 46f5181 !Line: 177 - style: Parameter 'pixelData' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 236 to 241 in 46f5181 !Line: 236 - style: Parameter 'sector' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 237 to 242 in 46f5181 !Line: 237 - style: Parameter 'worldPoint' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 237 to 242 in 46f5181 !Line: 237 - style: Parameter 'viewPoint' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 246 to 251 in 46f5181 !Line: 246 - style: Parameter 'sector' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 265 to 270 in 46f5181 !Line: 265 - style: Parameter 'callbacks' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 272 to 277 in 46f5181 !Line: 272 - style: Parameter 'texture' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 273 to 278 in 46f5181 !Line: 273 - style: Parameter 'texture' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 274 to 279 in 46f5181 !Line: 274 - style: Parameter 'rect' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 275 to 280 in 46f5181 !Line: 275 - style: Parameter 'rect' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 276 to 281 in 46f5181 !Line: 276 - style: Parameter 'texture' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 276 to 281 in 46f5181 !Line: 276 - style: Parameter 'rect' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 278 to 283 in 46f5181 !Line: 278 - style: Parameter 'texture' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 278 to 283 in 46f5181 !Line: 278 - style: Parameter 'rect' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_stubs.cpp Lines 342 to 345 in 46f5181 !Line: 342 - style: Parameter 'name' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 101 to 106 in 46f5181 !Line: 101 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 68 to 73 in 46f5181 !Line: 68 - style: Parameter 'm' can be declared as reference to const. However it seems that 'audioTask' is a callback function, if 'm' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 194 - note: You might need to cast the function pointer here
!Line: 68 - note: Parameter 'm' can be declared as reference to constesp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 68 to 73 in 46f5181 !Line: 68 - style: Parameter 'cv' can be declared as reference to const. However it seems that 'audioTask' is a callback function, if 'cv' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 194 - note: You might need to cast the function pointer here
!Line: 68 - note: Parameter 'cv' can be declared as reference to constesp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 68 to 73 in 46f5181 !Line: 68 - style: Parameter 'task_notified' can be declared as reference to const. However it seems that 'audioTask' is a callback function, if 'task_notified' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 194 - note: You might need to cast the function pointer here
!Line: 68 - note: Parameter 'task_notified' can be declared as reference to constesp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 275 to 280 in 46f5181 !Line: 275 - style: Parameter 'cbUserData' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 276 to 281 in 46f5181 !Line: 276 - style: Parameter 'userData' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 277 to 282 in 46f5181 !Line: 277 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 279 to 284 in 46f5181 !Line: 279 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 280 to 285 in 46f5181 !Line: 280 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 281 to 286 in 46f5181 !Line: 281 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 282 to 287 in 46f5181 !Line: 282 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 283 to 288 in 46f5181 !Line: 283 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 284 to 289 in 46f5181 !Line: 284 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/src/platform/esp_audio.cpp Lines 285 to 290 in 46f5181 !Line: 285 - style: Parameter 'source' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/mission.h Lines 15 to 20 in 46f5181 !Line: 15 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.h Lines 10 to 15 in 46f5181 !Line: 10 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.h Lines 52 to 57 in 46f5181 !Line: 52 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/src/platform/esp_alloc.cpp Lines 107 to 112 in 46f5181 !Line: 107 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/src/platform/esp_alloc.cpp Lines 118 to 123 in 46f5181 !Line: 118 - style: Variable 'mem' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/src/platform/esp_alloc.cpp Lines 166 to 171 in 46f5181 !Line: 166 - style: Variable 'header' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/src/platform/esp_alloc.cpp Lines 192 to 197 in 46f5181 !Line: 192 - style: Parameter 'mem' can be declared as pointer to const. However it seems that 'censusVisit' is a callback function, if 'mem' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 296 - note: You might need to cast the function pointer here
!Line: 192 - note: Parameter 'mem' can be declared as pointer to const!Line: 9 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.h Lines 9 to 14 in 46f5181 !Line: 9 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMusic.cpp Lines 273 to 278 in 46f5181 !Line: 273 - style: Variable 'gameSettings' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMusic.cpp Lines 327 to 332 in 46f5181 !Line: 327 - style: Parameter 'marker' can be declared as pointer to const. However it seems that 'iMuseCallback1' is a callback function, if 'marker' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 361 - note: You might need to cast the function pointer here
!Line: 327 - note: Parameter 'marker' can be declared as pointer to constesp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMusic.cpp Lines 373 to 378 in 46f5181 !Line: 373 - style: Variable 'lptr' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMusic.cpp Lines 409 to 414 in 46f5181 !Line: 409 - style: Variable 'lptr' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 126 to 131 in 46f5181 !Line: 126 - warning: sscanf() without field width limits can crash with huge input data. [invalidscanf]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 276 to 281 in 46f5181 !Line: 276 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 281 to 286 in 46f5181 !Line: 281 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 284 to 289 in 46f5181 !Line: 284 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 200 to 205 in 46f5181 !Line: 200 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 205 to 210 in 46f5181 !Line: 205 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 210 to 215 in 46f5181 !Line: 210 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 214 to 219 in 46f5181 !Line: 214 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 218 to 223 in 46f5181 !Line: 218 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 222 to 227 in 46f5181 !Line: 222 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 226 to 231 in 46f5181 !Line: 226 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 231 to 236 in 46f5181 !Line: 231 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 248 to 253 in 46f5181 !Line: 248 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 253 to 258 in 46f5181 !Line: 253 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 258 to 263 in 46f5181 !Line: 258 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 263 to 268 in 46f5181 !Line: 263 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 268 to 273 in 46f5181 !Line: 268 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 273 to 278 in 46f5181 !Line: 273 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 285 to 290 in 46f5181 !Line: 285 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 289 to 294 in 46f5181 !Line: 289 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 293 to 298 in 46f5181 !Line: 293 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 297 to 302 in 46f5181 !Line: 297 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 301 to 306 in 46f5181 !Line: 301 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 305 to 310 in 46f5181 !Line: 305 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 309 to 314 in 46f5181 !Line: 309 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/logic.cpp Lines 315 to 320 in 46f5181 !Line: 315 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/sound.h Lines 13 to 18 in 46f5181 !Line: 13 - error: Code 'using namespace TFE_Jedi' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.h Lines 10 to 15 in 46f5181 !Line: 10 - error: Code 'using namespace TFE_Jedi' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/time.h Lines 15 to 20 in 46f5181 !Line: 15 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMusic.h Lines 20 to 25 in 46f5181 !Line: 20 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/darkForcesMain.h Lines 10 to 15 in 46f5181 !Line: 10 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/config.h Lines 10 to 15 in 46f5181 !Line: 10 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 52 to 57 in 46f5181 !Line: 52 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 109 to 114 in 46f5181 !Line: 109 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 118 to 123 in 46f5181 !Line: 118 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 127 to 132 in 46f5181 !Line: 127 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 141 to 146 in 46f5181 !Line: 141 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 173 to 178 in 46f5181 !Line: 173 - style: Variable 'link' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 176 to 181 in 46f5181 !Line: 176 - style: Variable 'elev' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/updateLogic.cpp Lines 176 to 181 in 46f5181 !Line: 176 - style: Variable 'elev' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 531 to 536 in 46f5181 !Line: 531 - style: The scope of the variable 'programDataPath' can be reduced. [variableScope]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 532 to 537 in 46f5181 !Line: 532 - style: The scope of the variable 'sourcePath' can be reduced. [variableScope]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 400 to 405 in 46f5181 !Line: 400 - style: Variable 'displayName' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 401 to 406 in 46f5181 !Line: 401 - style: Variable 'gamePath' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 402 to 407 in 46f5181 !Line: 402 - style: Variable 'srcPath' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/agent.cpp Lines 402 to 407 in 46f5181 !Line: 402 - style: Variable 'srcPath' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/util.h Lines 10 to 15 in 46f5181 !Line: 10 - error: Code 'namespaceTFE_DarkForces{' is invalid C code. [syntaxError]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/briefingList.cpp Lines 75 to 80 in 46f5181 !Line: 75 - warning: sscanf() without field width limits can crash with huge input data. [invalidscanf]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 588 to 593 in 46f5181 !Line: 588 - style: Condition 'obj' is always true [knownConditionTrueFalse]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hitEffect.cpp Lines 350 to 355 in 46f5181 !Line: 350 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hitEffect.cpp Lines 441 to 446 in 46f5181 !Line: 441 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 488 to 493 in 46f5181 !Line: 488 - style: inconclusive: Function 'automap_drawLine' argument 1 names different: declaration 'px1' definition 'x0'. [funcArgNamesDifferent]
!Line: 89 - note: Function 'automap_drawLine' argument 1 names different: declaration 'px1' definition 'x0'.
!Line: 488 - note: Function 'automap_drawLine' argument 1 names different: declaration 'px1' definition 'x0'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 488 to 493 in 46f5181 !Line: 488 - style: inconclusive: Function 'automap_drawLine' argument 2 names different: declaration 'pz1' definition 'z0'. [funcArgNamesDifferent]
!Line: 89 - note: Function 'automap_drawLine' argument 2 names different: declaration 'pz1' definition 'z0'.
!Line: 488 - note: Function 'automap_drawLine' argument 2 names different: declaration 'pz1' definition 'z0'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 488 to 493 in 46f5181 !Line: 488 - style: inconclusive: Function 'automap_drawLine' argument 3 names different: declaration 'px2' definition 'x1'. [funcArgNamesDifferent]
!Line: 89 - note: Function 'automap_drawLine' argument 3 names different: declaration 'px2' definition 'x1'.
!Line: 488 - note: Function 'automap_drawLine' argument 3 names different: declaration 'px2' definition 'x1'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 488 to 493 in 46f5181 !Line: 488 - style: inconclusive: Function 'automap_drawLine' argument 4 names different: declaration 'pz2' definition 'z1'. [funcArgNamesDifferent]
!Line: 89 - note: Function 'automap_drawLine' argument 4 names different: declaration 'pz2' definition 'z1'.
!Line: 488 - note: Function 'automap_drawLine' argument 4 names different: declaration 'pz2' definition 'z1'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 132 to 137 in 46f5181 !Line: 132 - style: Variable 'screenRect' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 174 to 179 in 46f5181 !Line: 174 - style: Variable 'sector' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 494 to 499 in 46f5181 !Line: 494 - style: Parameter 'wall' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 496 to 501 in 46f5181 !Line: 496 - style: Variable 'w0' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 497 to 502 in 46f5181 !Line: 497 - style: Variable 'w1' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 538 to 543 in 46f5181 !Line: 538 - style: Variable 'curSector' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 539 to 544 in 46f5181 !Line: 539 - style: Variable 'nextSector' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/automap.cpp Lines 647 to 652 in 46f5181 !Line: 647 - style: Variable 'sector' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 680 to 685 in 46f5181 !Line: 680 - style: Condition 's_rightHudShow' is always true [knownConditionTrueFalse]
!Line: 677 - note: Assignment 's_rightHudShow=4', assigned value is 4
!Line: 680 - note: Condition 's_rightHudShow' is always trueesp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 708 to 713 in 46f5181 !Line: 708 - style: Condition 's_leftHudShow' is always true [knownConditionTrueFalse]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 142 to 147 in 46f5181 !Line: 142 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 161 to 166 in 46f5181 !Line: 161 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 396 to 401 in 46f5181 !Line: 396 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 1223 to 1228 in 46f5181 !Line: 1223 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 961 to 966 in 46f5181 !Line: 961 - style: Local variable 'dispWidth' shadows outer variable [shadowVariable]
!Line: 944 - note: Shadowed declaration
!Line: 961 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 961 to 966 in 46f5181 !Line: 961 - style: Local variable 'dispHeight' shadows outer variable [shadowVariable]
!Line: 944 - note: Shadowed declaration
!Line: 961 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 1034 to 1039 in 46f5181 !Line: 1034 - style: Parameter 'src' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 1053 to 1058 in 46f5181 !Line: 1053 - style: Parameter 'msg' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 1154 to 1159 in 46f5181 !Line: 1154 - style: Parameter 'rect' can be declared as pointer to const [constParameterPointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weapon.cpp Lines 521 to 526 in 46f5181 !Line: 521 - style: Variable 'prevWeapon' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 114 to 119 in 46f5181 !Line: 114 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 150 to 155 in 46f5181 !Line: 150 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 235 to 240 in 46f5181 !Line: 235 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 237 to 242 in 46f5181 !Line: 237 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 243 to 248 in 46f5181 !Line: 243 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 259 to 264 in 46f5181 !Line: 259 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 278 to 283 in 46f5181 !Line: 278 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 284 to 289 in 46f5181 !Line: 284 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 256 to 261 in 46f5181 !Line: 256 - style: Local variable 'logic' shadows outer argument [shadowArgument]
!Line: 241 - note: Shadowed declaration
!Line: 256 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 309 to 314 in 46f5181 !Line: 309 - style: Local variable 'obj' shadows outer argument [shadowArgument]
!Line: 273 - note: Shadowed declaration
!Line: 309 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 73 to 78 in 46f5181 !Line: 73 - style: Variable 'entity' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/generator.cpp Lines 144 to 149 in 46f5181 !Line: 144 - style: Parameter 'logic' can be declared as pointer to const. However it seems that 'generatorLogicCleanupFunc' is a callback function, if 'logic' is declared with const you might also need to cast function pointer(s). [constParameterCallback]
!Line: 289 - note: You might need to cast the function pointer here
!Line: 144 - note: Parameter 'logic' can be declared as pointer to constesp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 407 to 412 in 46f5181 !Line: 407 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/hud.cpp Lines 401 to 406 in 46f5181 !Line: 401 - style: Variable 'graphics' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/mission.cpp Lines 1415 to 1420 in 46f5181 !Line: 1415 - style: Variable 'end' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/mission.cpp Lines 1477 to 1482 in 46f5181 !Line: 1477 - style: Variable 'end' can be declared as pointer to const [constVariablePointer]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/mission.cpp Lines 1477 to 1482 in 46f5181 !Line: 1477 - style: Variable 'end' is assigned a value that is never used. [unreadVariable]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMessage.cpp Lines 80 to 85 in 46f5181 !Line: 80 - warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition]
!Line: 74 - note: outer condition: c
!Line: 80 - note: opposite inner condition: !cesp-box-emu/components/darkforces/tfe/TFE_DarkForces/gameMessage.cpp Lines 104 to 109 in 46f5181 !Line: 104 - warning: Opposite inner 'if' condition leads to a dead code block. [oppositeInnerCondition]
!Line: 98 - note: outer condition: c
!Line: 104 - note: opposite inner condition: !cesp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 199 to 204 in 46f5181 !Line: 199 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 325 to 330 in 46f5181 !Line: 325 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 509 to 514 in 46f5181 !Line: 509 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 661 to 666 in 46f5181 !Line: 661 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 842 to 847 in 46f5181 !Line: 842 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1000 to 1005 in 46f5181 !Line: 1000 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1159 to 1164 in 46f5181 !Line: 1159 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1309 to 1314 in 46f5181 !Line: 1309 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1493 to 1498 in 46f5181 !Line: 1493 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1621 to 1626 in 46f5181 !Line: 1621 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1743 to 1748 in 46f5181 !Line: 1743 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1911 to 1916 in 46f5181 !Line: 1911 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 2045 to 2050 in 46f5181 !Line: 2045 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 180 to 185 in 46f5181 !Line: 180 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 694 to 699 in 46f5181 !Line: 694 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 324 to 329 in 46f5181 !Line: 324 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 282 - note: Shadowed declaration
!Line: 324 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 508 to 513 in 46f5181 !Line: 508 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 466 - note: Shadowed declaration
!Line: 508 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 999 to 1004 in 46f5181 !Line: 999 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 960 - note: Shadowed declaration
!Line: 999 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1742 to 1747 in 46f5181 !Line: 1742 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 1701 - note: Shadowed declaration
!Line: 1742 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1116 to 1121 in 46f5181 !Line: 1116 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1590 to 1595 in 46f5181 !Line: 1590 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1595 to 1600 in 46f5181 !Line: 1595 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1686 to 1691 in 46f5181 !Line: 1686 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1705 to 1710 in 46f5181 !Line: 1705 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1723 to 1728 in 46f5181 !Line: 1723 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1735 to 1740 in 46f5181 !Line: 1735 - warning: Potentially invalid type conversion in old-style C cast, clarify/fix with C++ cast [dangerousTypeCast]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 1910 to 1915 in 46f5181 !Line: 1910 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 1875 - note: Shadowed declaration
!Line: 1910 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/weaponFireFunc.cpp Lines 2044 to 2049 in 46f5181 !Line: 2044 - style: Local variable 'yPos' shadows outer variable [shadowVariable]
!Line: 2010 - note: Shadowed declaration
!Line: 2044 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1140 to 1145 in 46f5181 !Line: 1140 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1145 to 1150 in 46f5181 !Line: 1145 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1150 to 1155 in 46f5181 !Line: 1150 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1180 to 1185 in 46f5181 !Line: 1180 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1184 to 1189 in 46f5181 !Line: 1184 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1189 to 1194 in 46f5181 !Line: 1189 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1691 to 1696 in 46f5181 !Line: 1691 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1709 to 1714 in 46f5181 !Line: 1709 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1727 to 1732 in 46f5181 !Line: 1727 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1739 to 1744 in 46f5181 !Line: 1739 - style: Consecutive return, break, continue, goto or throw statements are unnecessary. [duplicateBreak]
esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 833 to 838 in 46f5181 !Line: 833 - style: inconclusive: Function 'triggerLandMine' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 116 - note: Function 'triggerLandMine' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 833 - note: Function 'triggerLandMine' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 855 to 860 in 46f5181 !Line: 855 - style: inconclusive: Function 'stdProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 97 - note: Function 'stdProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 855 - note: Function 'stdProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 867 to 872 in 46f5181 !Line: 867 - style: inconclusive: Function 'landMineUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 98 - note: Function 'landMineUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 867 - note: Function 'landMineUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 887 to 892 in 46f5181 !Line: 887 - style: inconclusive: Function 'arcingProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 99 - note: Function 'arcingProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 887 - note: Function 'arcingProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 904 to 909 in 46f5181 !Line: 904 - style: inconclusive: Function 'homingMissileProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 100 - note: Function 'homingMissileProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 904 - note: Function 'homingMissileProjectileUpdateFunc' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1067 to 1072 in 46f5181 !Line: 1067 - style: inconclusive: Function 'proj_handleMovement' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 120 - note: Function 'proj_handleMovement' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 1067 - note: Function 'proj_handleMovement' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1202 to 1207 in 46f5181 !Line: 1202 - style: inconclusive: Function 'proj_move' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 94 - note: Function 'proj_move' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 1202 - note: Function 'proj_move' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1488 to 1493 in 46f5181 !Line: 1488 - style: inconclusive: Function 'proj_getHitObj' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 95 - note: Function 'proj_getHitObj' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 1488 - note: Function 'proj_getHitObj' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1674 to 1679 in 46f5181 !Line: 1674 - style: inconclusive: Function 'handleProjectileHit' argument 1 names different: declaration 'logic' definition 'projLogic'. [funcArgNamesDifferent]
!Line: 121 - note: Function 'handleProjectileHit' argument 1 names different: declaration 'logic' definition 'projLogic'.
!Line: 1674 - note: Function 'handleProjectileHit' argument 1 names different: declaration 'logic' definition 'projLogic'.esp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1345 to 1350 in 46f5181 !Line: 1345 - style: Local variable 'obj' shadows outer variable [shadowVariable]
!Line: 1204 - note: Shadowed declaration
!Line: 1345 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1403 to 1408 in 46f5181 !Line: 1403 - style: Local variable 'obj' shadows outer variable [shadowVariable]
!Line: 1204 - note: Shadowed declaration
!Line: 1403 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 1420 to 1425 in 46f5181 !Line: 1420 - style: Local variable 'obj' shadows outer variable [shadowVariable]
!Line: 1204 - note: Shadowed declaration
!Line: 1420 - note: Shadow variableesp-box-emu/components/darkforces/tfe/TFE_DarkForces/projectile.cpp Lines 985 to 990 in 46f5181 !Line: 985 - style: Parameter 'obj' can be declared as pointer to const [constParameterPointer]
!Maximum character count per GitHub comment has been reached! Not all warnings/errors has been parsed! |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved USB PHY handoff and allocator/error-handling issues remain.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (2)
What changed in this PR
This pull request moves LVGL allocations to PSRAM, replaces custom SD/USB handling with espp components, and updates dependencies.
Changes:
- Adds custom PSRAM-backed LVGL allocation.
- Migrates SD-card and USB MSC lifecycle management to espp.
- Updates ESP-IDF and component requirements.
| File | Summary and final review comments |
|---|---|
sdkconfig.defaults |
Enables custom LVGL allocation and removes the obsolete MSC mount-path setting. |
main/idf_component.yml |
Updates IDF and monitor requirements. |
components/box-emu/src/lvgl_mem.c |
Implements PSRAM allocation. Moderate (2 votes): add the custom-malloc setting to the standalone example or conditionally compile this implementation. Moderate (1 vote): include MALLOC_CAP_INTERNAL in the fallback mask. |
components/box-emu/src/box-emu.cpp |
Migrates SD/USB lifecycle handling. Critical (1 vote): ensure the USB-Serial-JTAG PHY is released through the supported handoff path before the first MSC initialization; this also affects line 626. Moderate (1 vote): check and propagate or log usb_new_phy failures while still remounting the card. |
components/box-emu/include/box-emu.hpp |
Exposes component APIs and ownership state. Nit (1 vote each): clarify that card ownership restrictions apply while the host owns the medium, not for the entire USB-enabled period. |
components/box-emu/idf_component.yml |
Updates and adds LVGL, espp, and USB dependencies. |
components/box-emu/CMakeLists.txt |
Declares the new build requirements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| if (jtag_phy_) { | ||
| logger_.debug("Deleting JTAG PHY"); | ||
| usb_del_phy(jtag_phy_); | ||
| jtag_phy_ = nullptr; | ||
| } |
| // LVGL is built with CONFIG_LV_USE_CUSTOM_MALLOC (see sdkconfig.defaults), so | ||
| // its allocator hooks are implemented here instead of by a fixed-size pool in | ||
| // internal RAM. Everything LVGL allocates (objects, styles, draw buffers, the | ||
| // rom list of the GUI, the pause menu, ...) goes to the PSRAM heap; only if | ||
| // PSRAM is exhausted does an allocation fall back to internal RAM. |
ESP-IDF Size Report for 'Esp Box Emu'
FLASH uses app .bin size or json2 flash sum. RAM sums DRAM+IRAM via idf_size. Percentages shown when totals are available. |


Description
Three related changes to the
box-emucomponent:LVGL memory in PSRAM
LVGL is now built with
CONFIG_LV_USE_CUSTOM_MALLOC, andcomponents/box-emu/src/lvgl_mem.cimplements its allocator hooks on the PSRAM heap (MALLOC_CAP_SPIRAM), falling back to internal RAM only if PSRAM is exhausted.lv_mem_monitor()reports the PSRAM heap. Before #120 LVGL used a fixed 50KB pool in internal RAM (which ran out in the pause menu and halted LVGL); #120 switched it to plainmalloc(), which only lands in PSRAM by virtue ofCONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0. This makes the placement explicit.The display's DMA buffers are unaffected: the BSP still allocates those with the capabilities the LCD driver needs.
espp
sdcardandusb_devicecomponentsespp::SdCard(SPI3, same pins), which separates card initialization from FAT mounting.BoxEmu::sdcard()still returns thesdmmc_card_t*;BoxEmu::sdcard_component()exposes the component.espp::UsbDevice's MSC function. Enabling USB unmounts the card's volume from the application and hands the card to the host (same VID/PID/strings as before). If the host ejects the drive, the card is mounted for the application again automatically. Disabling USB stops the stack, reconnects the USB-Serial-JTAG console and mounts the card again.tinyusb_mscstorage code. It also removes a latent bug:jtag_phy_was never initialized but was passed tousb_del_phy()on the first USB enable.Dependency update
espp/sdcard,espp/usb_device)usb_device)esp_hw_support)CONFIG_TINYUSB_MSC_MOUNT_PATHis removed fromsdkconfig.defaults: the mount path is passed to the MSC medium directly.Motivation and Context
How has this been tested?
Notes for review
lv_obj_add_flag/lv_obj_remove_flag/lv_obj_has_flag, which the SquareLine-generated files undercomponents/gui/generateduse; these are warnings only and would need regenerating the UI to clear.Types of changes
Checklist:
🤖 Generated with Claude Code
https://claude.ai/code/session_01AWhoGwibqcKDhcG17mjVT1