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;
}
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: