(small fix) Use memcpy instead of copying bytes manually #549
Quality Gate failed
Failed conditions
1 Security Hotspot
E Maintainability Rating on New Code (required ≥ A)
E Reliability Rating on New Code (required ≥ A)
See analysis details on SonarQube Cloud
Catch issues before they fail your Quality Gate with our IDE extension
SonarQube for IDE
Annotations
Check warning on line 252 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Make the type of this parameter a pointer-to-const. The current type of "hfp_connection" is "struct hfp_connection *".
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6TV&open=AZ0aS-mbuBFMN0bhY6TV&pullRequest=549
Check failure on line 1049 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this code to not nest more than 3 if|for|do|while|switch statements.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6TZ&open=AZ0aS-mbuBFMN0bhY6TZ&pullRequest=549
Check failure on line 552 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 35 to the 25 allowed.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6TX&open=AZ0aS-mbuBFMN0bhY6TX&pullRequest=549
Check warning on line 326 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Value stored to 'offset' is never read
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tj&open=AZ0aS-mbuBFMN0bhY6Tj&pullRequest=549
Check failure on line 1273 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 28 to the 25 allowed.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tb&open=AZ0aS-mbuBFMN0bhY6Tb&pullRequest=549
Check failure on line 1559 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Memory copy function overflows the destination buffer
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tm&open=AZ0aS-mbuBFMN0bhY6Tm&pullRequest=549
Check warning on line 335 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Value stored to 'offset' is never read
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tk&open=AZ0aS-mbuBFMN0bhY6Tk&pullRequest=549
Check failure on line 1296 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this code to not nest more than 3 if|for|do|while|switch statements.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Td&open=AZ0aS-mbuBFMN0bhY6Td&pullRequest=549
Check warning on line 317 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Value stored to 'offset' is never read
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Ti&open=AZ0aS-mbuBFMN0bhY6Ti&pullRequest=549
Check failure on line 754 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Access to field 'local_role' results in a dereference of a null pointer (loaded from variable 'hfp_connection')
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tl&open=AZ0aS-mbuBFMN0bhY6Tl&pullRequest=549
Check failure on line 1282 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this code to not nest more than 3 if|for|do|while|switch statements.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tc&open=AZ0aS-mbuBFMN0bhY6Tc&pullRequest=549
Check warning on line 1571 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Declare the variable "i" inside the loop.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tg&open=AZ0aS-mbuBFMN0bhY6Tg&pullRequest=549
Check failure on line 578 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this code to not nest more than 3 if|for|do|while|switch statements.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6TY&open=AZ0aS-mbuBFMN0bhY6TY&pullRequest=549
Check warning on line 1456 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Declare the variable "pos" inside the loop.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Tf&open=AZ0aS-mbuBFMN0bhY6Tf&pullRequest=549
Check warning on line 1953 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Make the type of this parameter a pointer-to-const. The current type of "hfp_connection" is "struct hfp_connection *".
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Th&open=AZ0aS-mbuBFMN0bhY6Th&pullRequest=549
Check failure on line 1138 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Refactor this function to reduce its Cognitive Complexity from 30 to the 25 allowed.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Ta&open=AZ0aS-mbuBFMN0bhY6Ta&pullRequest=549
Check warning on line 1382 in src/classic/hfp_hf.c
sonarqubecloud / SonarCloud Code Analysis
Replace this "switch" statement by "if" statements to increase readability.
See more on https://sonarcloud.io/project/issues?id=bluekitchen_btstack&issues=AZ0aS-mbuBFMN0bhY6Te&open=AZ0aS-mbuBFMN0bhY6Te&pullRequest=549