You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In imx edma driver there are some variables that are set but never used, this is upsetting cppcheck but they are explicitly labeled in comments. Paul you appear to have added some of these, do you want to suppress these errors or remove these variables?
$ cppcheck --enable=all --inconclusive --library=posix drivers/imx/edma.c
Checking drivers/imx/edma.c ...
drivers/imx/edma.c:368:13: style: Variable 'handshake' is assigned a value that is never used. [unreadVariable]
handshake = config->dest_dev;
^
drivers/imx/edma.c:373:13: style: Variable 'handshake' is assigned a value that is never used. [unreadVariable]
handshake = config->src_dev;
^
drivers/imx/edma.c:349:17: style: Variable 'irq' is not assigned a value. [unassignedVariable]
int handshake, irq;
^
nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingIncludeSystem]
``
A refactor changed the way the DAI drivers fetch the handshake and I forgot to update edma. I feel like the compiler doesn't actually generate any code for these anyway.
Still, it would be cleaner to just remove them. Thanks for notifying.
Activity
[-][BUG][Cppcheck] [/-][+][BUG][Cppcheck] [EDMA] unused variables[/+][-][BUG][Cppcheck] [EDMA] unused variables[/-][+][BUG][Cppcheck][EDMA] unused variables[/+]dbaluta commentedon Feb 12, 2021
@cujomalainey care to share with us the command line you use to run
cppcheck. Just runningcppcheckwith no arguments results in no error.dbaluta commentedon Feb 12, 2021
Later edit:
cujomalainey commentedon Feb 12, 2021
Looks like you found them
cujomalainey commentedon Feb 12, 2021
also, ignore divide by sizeof(pointer), those are a bug in cppcheck that I have started a topic upstream about. https://sourceforge.net/p/cppcheck/discussion/general/thread/d7881b159c/
paulstelian97 commentedon Feb 15, 2021
A refactor changed the way the DAI drivers fetch the handshake and I forgot to update edma. I feel like the compiler doesn't actually generate any code for these anyway.
Still, it would be cleaner to just remove them. Thanks for notifying.
imx: edma: remove unused variable
imx: edma: remove unused variable
imx: edma: remove unused variable