Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some declarations of common sensor functions are not matched to their corresponding definitions. #291

Open
Scron-Chang opened this issue May 18, 2022 · 0 comments

Comments

@Scron-Chang
Copy link
Contributor

Hi @DelphineChiu

I got some error messages from the Build and Analyze: run-cppcheck task.

Files to check:
common/service/sensor/sensor.c
Errors Found:
common/service/sensor/sensor.c:274:26:Function 'stby_access' argument 1 names different: declaration 'sensor_num' definition 'sensor_number'.
common/service/sensor/sensor.c:279:24:Function 'dc_access' argument 1 names different: declaration 'sensor_num' definition 'sensor_number'.
common/service/sensor/sensor.c:284:26:Function 'post_access' argument 1 names different: declaration 'sensor_num' definition 'sensor_number'.
common/service/sensor/sensor.c:289:24:Function 'me_access' argument 1 names different: declaration 'sensor_num' definition 'sensor_number'.

The root cause should be some declarations don't match their corresponding definition.
For instance,

bool stby_access(uint8_t sensor_number)
{
return true;
}

bool stby_access(uint8_t sensor_num);

What would you suggest to handle this issue?

@Scron-Chang Scron-Chang changed the title Some declarations of common sensor functions are not matched to the corresponding definitions. Some declarations of common sensor functions are not matched to their corresponding definitions. May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant