-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Armcc5 compilation fixes #10900
Conversation
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
@TeroJaasko, thank you for your changes. |
#include "Callback.h" | ||
#include <cstdarg> | ||
|
||
#include <stdarg.h> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
e391908
to
bae3043
Compare
CI started |
Test run: SUCCESSSummary: 11 of 11 test jobs passed |
Description
ARMC5 build was broken on debug profile. While waiting builds to finish, fixed also few warnings caused by Nanostack.h.
Pull request type
Reviewers
Release Notes