poco, flexelint , data

Please post support and help requests here.
Posts: 5
Joined: 20 Jan 2012, 00:04

poco, flexelint , data

Postby CER » 22 Oct 2012, 21:56


I have the following code

Code: Select all

   Session session(_sessionFactory.create());
   session << "DROP TABLE IF EXISTS cep_schema_metadata", now;

it compiles and works fine.

But, when I process it to the C++ code analyzer Flexelint, I am getting the following. The line 149 is the second one of my snippet

96 session << "DROP TABLE IF EXISTS cep_schema_metadata", now;
97 CEP/Data/src/SQLiteDataStoreService.cpp 149 Info 1793: While calling
98 'Poco::Data::Statement::operator,(void (*)(Poco::Data::Statement &))':
99 Initializing the implicit object parameter 'Poco::Data::Statement &' (a
100 non-const reference) with a non-lvalue (a temporary object of type
101 'Poco::Data::Statement')
102 CEP/Data/src/SQLiteDataStoreService.cpp 149 Warning 534: Ignoring return
103 value of function 'Poco::Data::Statement::operator,(void
104 (*)(Poco::Data::Statement &))' (compare with line 161, file
105 Data/include/Poco/Data/Statement.h)
106 Data/include/Poco/Data/Statement.h 161 Info 830: Location cited in prior
107 message

What do you think of this message?
Has Poco been "linted"?


Posts: 1329
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: poco, flexelint , data

Postby alex » 22 Oct 2012, 23:16

CER wrote:What do you think of this message?

You can not use the temporary Statement anywhere else, you do not need the return value and code does what you want. No reason to worry about it.

Return to “Support”

Who is online

Users browsing this forum: No registered users and 3 guests