Post

Replies

Boosts

Views

Activity

Reply to static analyzer error in std::sort
For what it's worth, I produced a shorter program that no longer depends on CoreFoundation but still produces the same static analyzer warning. #include <algorithm> #include <string> #include <strings.h> #include <vector> int main(int argc, const char * argv[]) { std::vector<std::string> names{ "obey", "Zorro", "can" }; std::sort( names.begin(), names.end(), [](const std::string& a, const std::string& b) { return strcasecmp( a.c_str(), b.c_str() ) < 0; } ); return EXIT_SUCCESS; }
3d
Reply to static analyzer error in std::sort
@DTS Engineer The error points to line 24. I'm not sure what you mean by "output box", but here is a screenshot of the Issue Navigator.
Replies
Boosts
Views
Activity
3d
Reply to static analyzer error in std::sort
For what it's worth, I produced a shorter program that no longer depends on CoreFoundation but still produces the same static analyzer warning. #include <algorithm> #include <string> #include <strings.h> #include <vector> int main(int argc, const char * argv[]) { std::vector<std::string> names{ "obey", "Zorro", "can" }; std::sort( names.begin(), names.end(), [](const std::string& a, const std::string& b) { return strcasecmp( a.c_str(), b.c_str() ) < 0; } ); return EXIT_SUCCESS; }
Replies
Boosts
Views
Activity
3d
Reply to static analyzer error in std::sort
As I said in my first post, I already filed a bug, FB22735405. I have updated it with the shorter code.
Replies
Boosts
Views
Activity
1d