esp-box-emu icon indicating copy to clipboard operation
esp-box-emu copied to clipboard

Feature/mcume

Open finger563 opened this issue 2 years ago • 1 comments

Description

Motivation and Context

How has this been tested?

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation Update
  • [ ] Hardware (schematic, board, system design) change
  • [ ] Software change

Checklist:

  • [ ] My change requires a change to the documentation.
  • [ ] I have added / updated the documentation related to this change via either README or WIKI

Software

  • [ ] I have added tests to cover my changes.
  • [ ] I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • [ ] All new and existing tests passed.
  • [ ] My code follows the code style of this project.

Hardware

  • [ ] I have updated the design files (schematic, board, libraries).
  • [ ] I have attached the PDFs of the SCH / BRD to this PR
  • [ ] I have updated the design output (GERBER, BOM) files.

finger563 avatar Nov 26 '23 23:11 finger563

:zap: Static analysis result :zap:

:red_circle: cppcheck found 35 issues! Click here to see details.

https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/AudioPlaySystem.h#L7-L12

!Line: 7 - error: Code 'classAudioPlaySystem{' is invalid C code. Use --std or --language to configure the language. [syntaxError]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/emuapi.cpp#L38-L43

!Line: 38 - warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/emuapi.cpp#L41-L46

!Line: 41 - warning: %d in format string (no. 1) requires 'int' but the argument type is 'unsigned int'. [invalidPrintfArgType_sint]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/emuapi.cpp#L23-L28

!Line: 23 - style: Parameter 'text' can be declared as pointer to const [constParameterPointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/AudioPlaySystem.cpp#L107-L112

!Line: 107 - style: The scope of the variable 's' can be reduced. [variableScope]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L287-L292

!Line: 287 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L288-L293

!Line: 288 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L295-L300

!Line: 295 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L296-L301

!Line: 296 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L300-L305

!Line: 300 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L301-L306

!Line: 301 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L307-L312

!Line: 307 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/sms.c#L308-L313

!Line: 308 - portability: Assigning an integer to a pointer is not portable. [AssignmentIntegerToAddress]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L696-L701

!Line: 696 - style: Variable 'slot1->TLL' is reassigned a value before the old one has been used. [redundantAssignment]

!Line: 695 - note: slot1->TLL is assigned
!Line: 696 - note: slot1->TLL is overwritten

https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L587-L592

!Line: 587 - style: The scope of the variable 'rate' can be reduced. [variableScope]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L588-L593

!Line: 588 - style: The scope of the variable 'j' can be reduced. [variableScope]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L1016-L1021

!Line: 1016 - style: The scope of the variable 'data' can be reduced. [variableScope]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L1054-L1059

!Line: 1054 - portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L340-L345

!Line: 340 - style: Parameter 'CH' can be declared as pointer to const [constParameterPointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L1069-L1074

!Line: 1069 - style: The scope of the variable 'data' can be reduced. [variableScope]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/fmopl.c#L1114-L1119

!Line: 1114 - portability: Shifting a negative value is technically undefined behaviour [shiftNegativeLHS]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L333-L338

!Line: 333 - warning: The address of local variable 'vram' might be accessed at non-zero index. [objectIndex]

!Line: 320 - note: Address of variable taken here.
!Line: 333 - note: The address of local variable 'vram' might be accessed at non-zero index.

https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L354-L359

!Line: 354 - warning: The address of local variable 'vram' might be accessed at non-zero index. [objectIndex]

!Line: 320 - note: Address of variable taken here.
!Line: 336 - note: Assuming condition is false
!Line: 354 - note: The address of local variable 'vram' might be accessed at non-zero index.

https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L357-L362

!Line: 357 - warning: The address of local variable 'vram' might be accessed at non-zero index. [objectIndex]

!Line: 320 - note: Address of variable taken here.
!Line: 336 - note: Assuming condition is false
!Line: 357 - note: The address of local variable 'vram' might be accessed at non-zero index.

https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L463-L468

!Line: 463 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L477-L482

!Line: 477 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L494-L499

!Line: 494 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L495-L500

!Line: 495 - style: Operator '|' with one operand equal to zero is redundant. [badBitmaskCheck]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L277-L282

!Line: 277 - style: Variable 'nt' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L320-L325

!Line: 320 - style: Variable 'st' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L393-L398

!Line: 393 - style: Variable 'cache_ptr' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/render.c#L418-L423

!Line: 418 - style: Variable 'cache_ptr' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/ym2413.c#L312-L317

!Line: 312 - style: Variable 'opll' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/ym2413.c#L371-L376

!Line: 371 - style: Variable 'param' can be declared as pointer to const [constVariablePointer]


https://github.com/esp-cpp/esp-box-emu/blob/cd7cdb66e3e32fd64546343416545967c59bc094/components/sms/teensysms/ym2413.c#L374-L379

!Line: 374 - style: Variable 'ch2op' can be declared as const array [constVariable]



github-actions[bot] avatar Dec 28 '23 22:12 github-actions[bot]