@@ -216,7 +216,7 @@ class PgSQL_Conn_Param {
216216
217217class PgSQL_Variable {
218218public:
219- char *value = ( char *) " " ;
219+ char *value = nullptr ;
220220 void fill_server_internal_session (nlohmann::json &j, int conn_num, int idx);
221221 void fill_client_internal_session (nlohmann::json &j, int idx);
222222};
@@ -244,7 +244,7 @@ class PgSQL_Connection_userinfo {
244244
245245class PgSQL_Connection {
246246public:
247- PgSQL_Connection (bool is_client_conn);
247+ explicit PgSQL_Connection (bool is_client_conn);
248248 ~PgSQL_Connection ();
249249
250250 PG_ASYNC_ST handler (short event);
@@ -500,15 +500,15 @@ class PgSQL_Connection {
500500 unsigned long long pgconnpoll_put;
501501 } statuses;
502502
503- PgSQL_Variable variables[ PGSQL_NAME_LAST_HIGH_WM] ;
504- uint32_t var_hash[ PGSQL_NAME_LAST_HIGH_WM] ;
503+ std::array< PgSQL_Variable, PGSQL_NAME_LAST_HIGH_WM> variables = {} ;
504+ std::array< uint32_t , PGSQL_NAME_LAST_HIGH_WM> var_hash = {} ;
505505 // for now we store possibly missing variables in the lower range
506506 // we may need to fix that, but this will cost performance
507- bool var_absent[ PGSQL_NAME_LAST_HIGH_WM] = { false };
507+ std::array< bool , PGSQL_NAME_LAST_HIGH_WM> var_absent = {};
508508 std::vector<uint32_t > dynamic_variables_idx;
509509
510- uint32_t startup_parameters_hash[ PGSQL_NAME_LAST_HIGH_WM] = {};
511- char * startup_parameters[ PGSQL_NAME_LAST_HIGH_WM] = {};
510+ std::array< uint32_t , PGSQL_NAME_LAST_HIGH_WM> startup_parameters_hash = {};
511+ std::array< char *, PGSQL_NAME_LAST_HIGH_WM> startup_parameters = {};
512512
513513 /* *
514514 * @brief Keeps tracks of the 'server_status'. Do not confuse with the 'server_status' from the
0 commit comments