2024-04-22 01:37 AM
Hi,
I got the following warning after generating the code for evspin32g4:
Description Resource Path Location Type
array subscript 1 is above array bounds of 'PWMC_Handle_t *[1]' {aka 'struct PWMC_Handle *[1]'} [-Warray-bounds] mc_tasks.c /xxx/Application/User line 831 C/C++ Problem
Code line on 831 is:
CodeReturn |= PWMC_IsFaultOccurred(pwmcHandle[bMotor]); /* check for fault. It return MC_OVER_CURR or MC_NO_FAULTS
Versions applications:
motorcontrol workbench: 6.2.1
STM32CubeMX: 6.11.0
STM32CubeIDE: 1.15.0
I did not added only code yet. Only thing I did yet is converting the code from c to c++. If I convert back the warning is still there after building. Could someone help me please with this warning?
2024-04-22 02:03 AM
Hi,
and if you make new project (same), with standard settings (C code.) - what then : warning also ?
2024-04-22 02:11 AM
Hi,
With new project and no changes (C code), I still has the same problem
2024-04-22 05:30 AM
Hello Tmasin,
Thank you for your report. We will start working on a fix and we will come back to you shortly once we know more about it.
In the meantime, know that this warning should not prevent you from running the code successfully.
2024-05-17 01:24 AM
Hello,
This issue has been fixed in our new MCSDK 6.3.0 release,
so feel free to download it and try if it solved correctly your issue reported in this post.
Kind Regards.
Amina.