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

Armcc5 compilation fixes #10900

Merged
merged 2 commits into from
Jul 1, 2019
Merged

Conversation

TeroJaasko
Copy link
Contributor

Description

ARMC5 build was broken on debug profile. While waiting builds to finish, fixed also few warnings caused by Nanostack.h.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

ARMCC reminds of the missing virtual declaration of call_in in the
Nanostack.h.

Warnings silenced:
---8<---8<---
Compile [ 52.3%]: LoWPANNDInterface.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
Compile [ 52.4%]: NanostackEMACInterface.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
Compile [ 52.5%]: MeshInterfaceNanostack.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
Compile [ 52.6%]: NanostackEthernetInterface.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
Compile [ 52.7%]: ThreadInterface.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
ompile [ 53.0%]: WisunInterface.cpp
[Warning] Nanostack.h@278,0:  ARMmbed#1300-D: call_in inherits implicit virtual
@ciarmcom ciarmcom requested review from a team June 26, 2019 15:00
@ciarmcom
Copy link
Member

@TeroJaasko, thank you for your changes.
@ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-wan @ARMmbed/mbed-os-maintainers please review.

#include "Callback.h"
#include <cstdarg>

#include <stdarg.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be inclined to fix this the other way and turn va_list into std:;va_list, unless <cstdarg> itself is broken.

Copy link
Contributor Author

@TeroJaasko TeroJaasko Jun 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Changed back the <cstdarg> and converted va_list to std::va_list.
Anyway, what itches my nerves is that the compilation fails only on debug profile. Is someone leaking a using namespace std; from a #if _DEBUG block or what is going on there?

ARMC5 failed to compile the code with debug-profile (!!) as va_list
is getting into std:: namespace when one includes <cstdarg>. Other
compilers seem to be more relaxed, and so is ARMC5 if compiled
with other profiles.

Add the explicit std:: to references of va_list.

While here, remove one extra copy of "#include "PlatformMutex.h""
and a "#include <stdarg.h>" which is kind of duplicate of
"#include <cstdarg>".

Error being fixed:
--8<--8<--8<--
Compile [ 81.8%]: ATHandler.cpp
[Error] ATHandler.h@552,0:  ARMmbed#20: identifier "va_list" is undefined
[Error] ATHandler.cpp@1226,0:  ARMmbed#147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
[ERROR] "./mbed-os/features/cellular/framework/AT/ATHandler.h", line 552: Error:  ARMmbed#20: identifier "va_list" is undefined
"./mbed-os/features/cellular/framework/AT/ATHandler.cpp", line 1226: Error:  ARMmbed#147: declaration is incompatible with "void mbed::ATHandler::handle_args(const char *, <error-type>)"  (declared at line 552 of "./mbed-os/features/cellular/framework/AT/ATHandler.h")
./mbed-os/features/cellular/framework/AT/ATHandler.cpp: 0 warnings, 2 errors
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 28, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Jun 28, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants