0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-15 20:31:16 +08:00

Fix warnings (#422)

This commit is contained in:
Roland Bock 2022-03-04 07:49:05 +01:00
parent 9fc07ef757
commit b965b2a1df
2 changed files with 9 additions and 1 deletions

View File

@ -38,7 +38,7 @@
#include "detail/prepared_statement_handle.h"
#if defined(_WIN32) || defined(_WIN64)
#ifdef _MSC_VER
#pragma warning(disable : 4800) // int to bool
#endif
namespace sqlpp

View File

@ -33,6 +33,7 @@
#include <string>
#include <cstring>
#include <pg_config.h>
#include <libpq-fe.h>
#include <sqlpp11/postgresql/visibility.h>
@ -299,8 +300,15 @@ namespace sqlpp
case PGRES_FATAL_ERROR:
Err = PQresultErrorMessage(m_result);
break;
#if PG_MAJORVERSION_NUM >= 13
case PGRES_COPY_BOTH:
case PGRES_SINGLE_TUPLE:
#endif
#if PG_MAJORVERSION_NUM >= 14
case PGRES_PIPELINE_SYNC:
case PGRES_PIPELINE_ABORTED:
#endif
default:
throw sqlpp::exception("pqxx::result: Unrecognized response code " +
std::to_string(PQresultStatus(m_result)));
}