FlexeLint/PC-lint is warning about that the return value of std::string::append is not considered on following reduced sample code:
#include <iostream>
#include <string>
int main() {
std::string s("Hell");
s.append(1,'o');
std::cout << s << std::endl;
return 0;
Calling FlexeLint gives the following warning:
Warning 534: Ignoring return value of function 'std::basic_string<char>::append(unsigned long, char)'
While that message is true, it does not make sense to catch the return value in this case because std::string::append simply returns *this.
In addition, any iterators, pointers and references related to this object may be invalidated. But this not the case, no iterators, pointers and references are used.
Question
Did i miss something important or is this simply a false positive of FlexeLint?