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

nrf51-sdk generates warnings for old style declarations #10

Closed
ghost opened this issue Dec 21, 2015 · 6 comments
Closed

nrf51-sdk generates warnings for old style declarations #10

ghost opened this issue Dec 21, 2015 · 6 comments

Comments

@ghost
Copy link

ghost commented Dec 21, 2015

yotta_modules/nrf51-sdk/source/nordic_sdk/components/drivers_nrf/hal/nrf_delay.h:84:1: warning: 'inline' is not at beginning of declaration [-Wold-style-declaration]
 static void __INLINE nrf_delay_us(uint32_t volatile number_of_us)

I tried adding that to yotta_modules/nrf51-sdk/source/supress-warnings.cmake but then it told me

[97/130] Building CXX object ym/nrf51-sdk/source/CMakeFiles/nrf51-...-sdk/source/nordic_sdk/components/ble/common/ble_conn_params.cpp.o
cc1plus: warning: command line option '-Wold-style-declaration' is valid for C/ObjC but not for C++

I didn't see a way to COMPILE_FLAGS for just C++.

@LiyouZhou
Copy link
Contributor

@jrobeson This is a known issue. This style error is inherited from the Nordic sdk which uses different build system. This warning should not affect build, but it is annoying.

We try to make as few changes to the original sdk files as possible, but you can try putting __INLINE to the start of the line, should make this warning go away. You can make a pull request when you have made the fix.

We are working on reducing the number of warnings to make the build process more pleasant.

@rgrover
Copy link
Contributor

rgrover commented Dec 21, 2015

closing it for now. please re-open if you need further clarification

@rgrover rgrover closed this as completed Dec 21, 2015
@ghost
Copy link
Author

ghost commented Dec 21, 2015

I didn't know you folks were accepting those kinds of changes to the sdk files. I'll certainly submit that as a PR , if it is acceptable.

@LiyouZhou
Copy link
Contributor

@jrobeson

Contributor agreement

For your pull request to be accepted, we will need you to agree to our contributor agreement to give us the necessary rights to use and distribute your contributions. (To click through the agreement create an account on mbed.com and log in.)

Please accept the agreement and let me know your mbed.com account name so I can verify. Thanks!

@ghost
Copy link
Author

ghost commented Dec 22, 2015

I already signed it (as per my commits to mbed/mbed) . same as my github id: jrobeson

@ghost
Copy link
Author

ghost commented Dec 22, 2015

I'll take a look at this again once the update to sdk 10 is merged.

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

2 participants