From 3a6aa9044045a59c333c545c682a1691910a9934 Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Tue, 17 Dec 2024 12:19:47 -0500 Subject: [PATCH] [#8088] Deprecate fillGenQueryInpFromStrCond(). --- lib/core/include/irods/irods_query.hpp | 3 +++ lib/core/include/irods/rcMisc.h | 2 +- server/re/src/genQueryMS.cpp | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/core/include/irods/irods_query.hpp b/lib/core/include/irods/irods_query.hpp index c9c2f6cc04..fd16e4e2b6 100644 --- a/lib/core/include/irods/irods_query.hpp +++ b/lib/core/include/irods/irods_query.hpp @@ -167,9 +167,12 @@ namespace irods addKeyVal(&gen_input_.condInput, ZONE_KW, _zone_hint.c_str()); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" const int fill_err = fillGenQueryInpFromStrCond( const_cast(_query_string.c_str()), &gen_input_); +#pragma GCC diagnostic pop if(fill_err < 0) { THROW(fill_err, fmt::format("query fill failed for [{}]", _query_string)); } diff --git a/lib/core/include/irods/rcMisc.h b/lib/core/include/irods/rcMisc.h index 56a7a6b1e7..10c51adcff 100644 --- a/lib/core/include/irods/rcMisc.h +++ b/lib/core/include/irods/rcMisc.h @@ -275,7 +275,7 @@ int getNextRepeatTime(char* currTime, char* delayStr, char* nextTime); int printError(rcComm_t* Conn, int status, char* routineName); -int fillGenQueryInpFromStrCond(char* str, genQueryInp_t* genQueryInp); +__attribute__((deprecated("Use GenQuery2 API."))) int fillGenQueryInpFromStrCond(char* str, genQueryInp_t* genQueryInp); int printGenQueryOut(FILE* fd, char* format, char* hint, genQueryOut_t* genQueryOut); diff --git a/server/re/src/genQueryMS.cpp b/server/re/src/genQueryMS.cpp index 9c0a2e08d6..456c3a51ca 100644 --- a/server/re/src/genQueryMS.cpp +++ b/server/re/src/genQueryMS.cpp @@ -52,7 +52,10 @@ int msiExecStrCondQuery( msParam_t* queryParam, msParam_t* genQueryOutParam, rul strcpy( query, ( const char* )queryParam->inOutStruct ); memset( &genQueryInp, 0, sizeof( genQueryInp_t ) ); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" i = fillGenQueryInpFromStrCond( query, &genQueryInp ); +#pragma GCC diagnostic pop free( query ); if ( i < 0 ) { return i; @@ -533,7 +536,10 @@ msiMakeGenQuery( msParam_t* selectListStr, msParam_t* condStr, msParam_t* genQue /* set up GenQueryInp */ genQueryInp->maxRows = MAX_SQL_ROWS; genQueryInp->continueInx = 0; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" rei->status = fillGenQueryInpFromStrCond( query, genQueryInp ); +#pragma GCC diagnostic pop if ( rei->status < 0 ) { rodsLog( LOG_ERROR, "msiMakeGenQuery: fillGenQueryInpFromStrCond failed." ); freeGenQueryInp( &genQueryInp );