From e6573f53754a2a25269f192514d070c6466d1fb5 Mon Sep 17 00:00:00 2001 From: Kory Draughn Date: Wed, 20 Mar 2024 12:03:58 -0400 Subject: [PATCH] squash. more deprecations. --- lib/api/include/irods/apiNumberData.h | 1 + lib/api/include/irods/generalUpdate.h | 5 ++--- lib/core/include/irods/rodsGeneralUpdate.h | 4 ++-- plugins/database/src/db_plugin.cpp | 9 +++++++++ plugins/database/src/general_update.cpp | 9 +++++++++ server/api/include/irods/rsGeneralUpdate.hpp | 8 +++++--- server/api/src/rsGeneralUpdate.cpp | 6 +++--- .../core/include/irods/irods_api_calling_functions.hpp | 1 + server/core/include/irods/irods_database_constants.hpp | 1 + server/core/src/irods_api_calling_functions.cpp | 3 +++ server/icat/include/irods/icatHighLevelRoutines.hpp | 5 ++--- 11 files changed, 38 insertions(+), 14 deletions(-) diff --git a/lib/api/include/irods/apiNumberData.h b/lib/api/include/irods/apiNumberData.h index 0a9d771df7..527fefef22 100644 --- a/lib/api/include/irods/apiNumberData.h +++ b/lib/api/include/irods/apiNumberData.h @@ -129,6 +129,7 @@ API_NUMBER(MOD_AVU_METADATA_AN, 706) API_NUMBER(MOD_ACCESS_CONTROL_AN, 707) API_NUMBER(RULE_EXEC_MOD_AN, 708) API_NUMBER(GET_TEMP_PASSWORD_AN, 709) +// DEPRECATED: GeneralUpdate is deprecated. Its use should be avoided. API_NUMBER(GENERAL_UPDATE_AN, 710) API_NUMBER(READ_COLLECTION_AN, 713) API_NUMBER(USER_ADMIN_AN, 714) diff --git a/lib/api/include/irods/generalUpdate.h b/lib/api/include/irods/generalUpdate.h index fad0445e78..2885a7d130 100644 --- a/lib/api/include/irods/generalUpdate.h +++ b/lib/api/include/irods/generalUpdate.h @@ -8,9 +8,8 @@ extern "C" { #endif -int rcGeneralUpdate(rcComm_t* conn, generalUpdateInp_t* generalUpdateInp) - __attribute__((deprecated("rcGeneralUpdate is deprecated and will be removed in a later release. If you are " - "reaching for this, consider revising your approach."))); +__attribute__((deprecated("Its use should be avoided."))) +int rcGeneralUpdate(rcComm_t* conn, generalUpdateInp_t* generalUpdateInp); #ifdef __cplusplus } // extern "C" diff --git a/lib/core/include/irods/rodsGeneralUpdate.h b/lib/core/include/irods/rodsGeneralUpdate.h index b72edc2ef8..20b0fdb65c 100644 --- a/lib/core/include/irods/rodsGeneralUpdate.h +++ b/lib/core/include/irods/rodsGeneralUpdate.h @@ -24,10 +24,10 @@ #define UPDATE_NOW_TIME "update_now_time" #define GeneralUpdateInp_PI "int type; struct InxValPair_PI;" -typedef struct GeneralUpdateInp { + +__attribute__((deprecated)) typedef struct __attribute__((deprecated)) GeneralUpdateInp { // NOLINT(modernize-use-using) int type; /* GEN_UPDATE_INSERT or DELETE */ inxValPair_t values; /* Column IDs (from rodsGenQuery.h) and values */ } generalUpdateInp_t; - #endif // RODS_GENERAL_UPDATE_H__ diff --git a/plugins/database/src/db_plugin.cpp b/plugins/database/src/db_plugin.cpp index 963b4cbf0b..820767efcc 100644 --- a/plugins/database/src/db_plugin.cpp +++ b/plugins/database/src/db_plugin.cpp @@ -15406,11 +15406,17 @@ irods::error db_gen_query_ticket_setup_op( // =-=-=-=-=-=-=- // from general_query.cpp :: +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" int chl_general_update_impl( generalUpdateInp_t ); +#pragma clang diagnostic pop +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" irods::error db_general_update_op( irods::plugin_context& _ctx, generalUpdateInp_t* _update_inp ) { +#pragma clang diagnostic pop // =-=-=-=-=-=-=- // check the context irods::error ret = _ctx.valid(); @@ -16178,10 +16184,13 @@ irods::database* plugin_factory( DATABASE_OP_GEN_QUERY, function( db_gen_query_op ) ); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" pg->add_operation( DATABASE_OP_GENERAL_UPDATE, function( db_general_update_op ) ); +#pragma clang diagnostic pop pg->add_operation( DATABASE_OP_GEN_QUERY_ACCESS_CONTROL_SETUP, function( diff --git a/plugins/database/src/general_update.cpp b/plugins/database/src/general_update.cpp index 6cc082e748..f8b69427a8 100644 --- a/plugins/database/src/general_update.cpp +++ b/plugins/database/src/general_update.cpp @@ -28,8 +28,11 @@ int updateDebug = 0; extern int logSQLGenUpdate; char tSQL[MAX_SQL_SIZE]; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" int generalInsert( generalUpdateInp_t generalUpdateInp ) { +#pragma clang diagnostic pop int i, j; char *tableName, *columnName; char *firstTableName; @@ -127,8 +130,11 @@ generalInsert( generalUpdateInp_t generalUpdateInp ) { return 0; } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" int generalDelete( generalUpdateInp_t generalUpdateInp ) { +#pragma clang diagnostic pop int i, j; char *tableName, *columnName; char *firstTableName; @@ -180,9 +186,12 @@ generalDelete( generalUpdateInp_t generalUpdateInp ) { } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" /* General Update */ int chl_general_update_impl( generalUpdateInp_t generalUpdateInp ) { +#pragma clang diagnostic pop int status; static int firstCall = 1; icatSessionStruct *icss; diff --git a/server/api/include/irods/rsGeneralUpdate.hpp b/server/api/include/irods/rsGeneralUpdate.hpp index 1cf7153eb9..cfc39a7122 100644 --- a/server/api/include/irods/rsGeneralUpdate.hpp +++ b/server/api/include/irods/rsGeneralUpdate.hpp @@ -4,10 +4,12 @@ #include "irods/rcConnect.h" #include "irods/rodsGeneralUpdate.h" -int rsGeneralUpdate(rsComm_t* rsComm, generalUpdateInp_t* generalUpdateInp) - __attribute__((deprecated("rsGeneralUpdate is deprecated and will be removed in a later release. If you are " - "reaching for this, consider revising your approach."))); +__attribute__((deprecated("Its use should be avoided."))) +int rsGeneralUpdate(rsComm_t* rsComm, generalUpdateInp_t* generalUpdateInp); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" int _rsGeneralUpdate( generalUpdateInp_t *generalUpdateInp ); +#pragma clang diagnostic pop #endif // IRODS_RS_GENERAL_UPDATE_HPP diff --git a/server/api/src/rsGeneralUpdate.cpp b/server/api/src/rsGeneralUpdate.cpp index 7d2b9e19ca..3865fbdb3b 100644 --- a/server/api/src/rsGeneralUpdate.cpp +++ b/server/api/src/rsGeneralUpdate.cpp @@ -62,10 +62,10 @@ rsGeneralUpdate( rsComm_t *rsComm, generalUpdateInp_t *generalUpdateInp ) { return status; } -int -_rsGeneralUpdate( generalUpdateInp_t *generalUpdateInp ) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +int +_rsGeneralUpdate( generalUpdateInp_t *generalUpdateInp ) { return chlGeneralUpdate(*generalUpdateInp); -#pragma clang diagnostic pop } +#pragma clang diagnostic pop diff --git a/server/core/include/irods/irods_api_calling_functions.hpp b/server/core/include/irods/irods_api_calling_functions.hpp index a87c5b23d8..93656f08e8 100644 --- a/server/core/include/irods/irods_api_calling_functions.hpp +++ b/server/core/include/irods/irods_api_calling_functions.hpp @@ -601,6 +601,7 @@ int call_getTempPasswordOut( #endif #ifdef CREATE_API_TABLE_FOR_SERVER +[[deprecated("GeneralUpdate is deprecated. Its use should be avoided.")]] int call_generalUpdateInp( irods::api_entry*, rsComm_t*, diff --git a/server/core/include/irods/irods_database_constants.hpp b/server/core/include/irods/irods_database_constants.hpp index 4fe982aa11..fd8e736c29 100644 --- a/server/core/include/irods/irods_database_constants.hpp +++ b/server/core/include/irods/irods_database_constants.hpp @@ -37,6 +37,7 @@ namespace irods const std::string DATABASE_OP_GEN_QUERY_ACCESS_CONTROL_SETUP( "database_gen_query_access_control_setup" ); const std::string DATABASE_OP_GEN_QUERY_TICKET_SETUP( "database_gen_query_ticket_setup" ); const std::string DATABASE_OP_SPECIFIC_QUERY( "database_specific_query" ); + [[deprecated("GeneralUpdate is deprecated. Its use should be avoided.")]] const std::string DATABASE_OP_GENERAL_UPDATE( "database_general_update" ); const std::string DATABASE_OP_DEL_COLL_BY_ADMIN( "database_del_coll_by_admin" ); const std::string DATABASE_OP_DEL_COLL( "database_del_coll" ); diff --git a/server/core/src/irods_api_calling_functions.cpp b/server/core/src/irods_api_calling_functions.cpp index 95a4eb3a5b..7154040f55 100644 --- a/server/core/src/irods_api_calling_functions.cpp +++ b/server/core/src/irods_api_calling_functions.cpp @@ -647,6 +647,8 @@ int call_ruleExecModInp( _inp); } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" int call_generalUpdateInp( irods::api_entry* _api, rsComm_t* _comm, @@ -656,6 +658,7 @@ int call_generalUpdateInp( _comm, _inp); } +#pragma clang diagnostic pop int call_modDataObjMetaInp( irods::api_entry* _api, diff --git a/server/icat/include/irods/icatHighLevelRoutines.hpp b/server/icat/include/irods/icatHighLevelRoutines.hpp index 0dd549060e..a9cefdb693 100644 --- a/server/icat/include/irods/icatHighLevelRoutines.hpp +++ b/server/icat/include/irods/icatHighLevelRoutines.hpp @@ -61,9 +61,8 @@ int chlGenQueryTicketSetup( const char *ticket, const char *clientAddr ); int chlSpecificQuery( specificQueryInp_t specificQueryInp, genQueryOut_t *genQueryOut ); -int chlGeneralUpdate(generalUpdateInp_t generalUpdateInp) - __attribute__((deprecated("chlGeneralUpdate is deprecated and will be removed in a later release. If you are " - "reaching for this, consider revising your approach."))); +__attribute__((deprecated("Its use should be avoided."))) +int chlGeneralUpdate(generalUpdateInp_t generalUpdateInp); int chlDelCollByAdmin( rsComm_t *rsComm, collInfo_t *collInfo ); int chlDelColl( rsComm_t *rsComm, collInfo_t *collInfo );