0

First post here, and very new. Here to learn.

I am using this header only library [SQlite ORM][1] in order to input standard c++ data types into an SQlite database. I am happy with the functionality, but I get a whole host of warnings from my compiler (Code::Blocks running on Ubuntu). It has done this since I started using it, and am wondering if I am doing something wrong.

Please let me know if there is something I need to to do to address these warnings.

    ||=== Build: Release in sqlite (compiler: GNU GCC Compiler) ===|
/home/sqlite_orm.h|3405|warning: user-defined ‘sqlite_orm::internal::conc_t<L, R> sqlite_orm::operator||(sqlite_orm::internal::expression_t<T>, R)’ always evaluates both arguments [-Weffc++]|
/home/sqlite_orm.h|3410|warning: user-defined ‘sqlite_orm::internal::conc_t<L, R> sqlite_orm::operator||(L, sqlite_orm::internal::expression_t<T>)’ always evaluates both arguments [-Weffc++]|
/home/sqlite_orm.h|3415|warning: user-defined ‘sqlite_orm::internal::conc_t<L, R> sqlite_orm::operator||(sqlite_orm::internal::expression_t<T>, sqlite_orm::internal::expression_t<T>)’ always evaluates both arguments [-Weffc++]|
/home/sqlite_orm.h|3559|warning: user-defined ‘auto sqlite_orm::operator&&(L, R)’ always evaluates both arguments [-Weffc++]|
/home/sqlite_orm.h|3574|warning: user-defined ‘auto sqlite_orm::operator||(L, R)’ always evaluates both arguments [-Weffc++]|
/home/sqlite_orm.h|9579|warning: postfix ‘void sqlite_orm::internal::iterator_t<V>::operator++(int)’ should return ‘sqlite_orm::internal::iterator_t<V>’ [-Weffc++]|
/home/sqlite_orm.h|9629|warning: ‘struct sqlite_orm::internal::connection_holder’ has pointer data members [-Weffc++]|
/home/sqlite_orm.h|9629|warning:   but does not override ‘sqlite_orm::internal::connection_holder(const sqlite_orm::internal::connection_holder&)’ [-Weffc++]|
/home/sqlite_orm.h|9629|warning:   or ‘operator=(const sqlite_orm::internal::connection_holder&)’ [-Weffc++]|
/home/sqlite_orm.h||In constructor ‘sqlite_orm::internal::limit_accesor::limit_accesor(sqlite_orm::internal::limit_accesor::get_connection_t)’:|
/home/sqlite_orm.h|11438|warning: ‘sqlite_orm::internal::limit_accesor::limits’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|11662|warning: ‘struct sqlite_orm::internal::backup_t’ has pointer data members [-Weffc++]|
/home/sqlite_orm.h|11662|warning:   but does not override ‘sqlite_orm::internal::backup_t(const sqlite_orm::internal::backup_t&)’ [-Weffc++]|
/home/sqlite_orm.h|11662|warning:   or ‘operator=(const sqlite_orm::internal::backup_t&)’ [-Weffc++]|
/home/sqlite_orm.h||In constructor ‘sqlite_orm::internal::storage_base::storage_base(const string&, int)’:|
/home/sqlite_orm.h|12339|warning: ‘sqlite_orm::internal::storage_base::on_open’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12339|warning: ‘sqlite_orm::internal::storage_base::collatingFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12339|warning: ‘sqlite_orm::internal::storage_base::_busy_handler’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12339|warning: ‘sqlite_orm::internal::storage_base::scalarFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12339|warning: ‘sqlite_orm::internal::storage_base::aggregateFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12350|warning: ‘sqlite_orm::internal::storage_base::collatingFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12350|warning: ‘sqlite_orm::internal::storage_base::_busy_handler’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12350|warning: ‘sqlite_orm::internal::storage_base::scalarFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h|12350|warning: ‘sqlite_orm::internal::storage_base::aggregateFunctions’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_orm.h||In constructor ‘sqlite_orm::internal::table_name_collector::table_name_collector(sqlite_orm::internal::table_name_collector::find_table_name_t)’:|
/home/sqlite_orm.h|12818|warning: ‘sqlite_orm::internal::table_name_collector::table_names’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp||In constructor ‘SQliteWriter::SQliteWriter(SQliteWriter::WriterMode)’:|
/home/sqlite_writer.cpp|22|warning: ‘SQliteWriter::error’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp|22|warning: ‘SQliteWriter::writerMode’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp||In constructor ‘SQliteWriter::SQliteWriter(int, int)’:|
/home/sqlite_writer.cpp|28|warning: ‘SQliteWriter::error’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp|28|warning: ‘SQliteWriter::writerMode’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp||In constructor ‘SQliteWriter::SQliteWriter(const char*, const char*, SQliteWriter::WriterMode)’:|
/home/sqlite_writer.cpp|38|warning: ‘SQliteWriter::error’ should be initialized in the member initialization list [-Weffc++]|
/home/sqlite_writer.cpp|38|warning: ‘SQliteWriter::writerMode’ should be initialized in the member initialization list [-Weffc++]|
||=== Build finished: 0 error(s), 29 warning(s) (0 minute(s), 5 second(s)) ===|
||=== Run: Release in sqlite (compiler: GNU GCC Compiler) ===|


  [1]: https://github.com/fnc12/sqlite_orm
jye
  • 3
  • 3
  • Apparently the library uses the `-Weffc++` option to enable more warnings that are often problematic. See [Understanding -Weffc++](https://stackoverflow.com/questions/11496942/understanding-weffc), and its accepted answer for some details. – Some programmer dude Feb 21 '22 at 15:44

0 Answers0