-
Notifications
You must be signed in to change notification settings - Fork 110
assert issues #33
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
assert issues #33
Conversation
@@ -18,6 +18,8 @@ | |||
#include <aws/crt/StlAllocator.h> | |||
#include <aws/crt/StringUtils.h> | |||
|
|||
#include <assert.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.
Why is this required? Why not just use AWS_ASSERT?
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.
When transforming a string -> enum, if we don't recognize the string that the service returned, it does assert(0); return static_cast<JobStatus>(-1);
It's not something we want to be fatal in a release product. I asked Jonathan if he wanted the assert removed, or preserved and he wanted it preserved here.
Sorry for merging before I noticed this comment
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.
/home/kevin/deviceagentcpp-build/aws-iot-device-sdk-cpp-v2-prefix/src/aws-iot-device-sdk-cpp-v2/discovery/source/DiscoveryClient.cpp:32:47: error: ‘AWS_ASSERT’ was not declared in this scope
Still an issue I believe
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.
This ought to work, the include chain is: DiscoveryClient.cpp
-> #include <aws/crt/Types.h>
-> #include <aws/common/common.h>
-> #include <aws/common/assert.inl>
->#define AWS_ASSERT
Have you updated to aws-crt-cpp v0.4.0?
#include <assert.h>
to enum-handling cpp files.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.