diff --git a/0041-Fix-compilation-warnings.patch b/0041-Fix-compilation-warnings.patch new file mode 100644 index 0000000000000000000000000000000000000000..75d4e539c25e6771f907ecf576721cb1bb7cc1a5 --- /dev/null +++ b/0041-Fix-compilation-warnings.patch @@ -0,0 +1,117 @@ +From f4dd9133e492d3a1152eea55dcd5835835237dcb Mon Sep 17 00:00:00 2001 +From: motodiary +Date: Tue, 4 Jun 2024 10:20:18 +0800 +Subject: [PATCH] Fix compilation warnings + +--- + src/database/pgsql_common.c | 41 +++++++++---------------------------- + 1 file changed, 10 insertions(+), 31 deletions(-) + +diff --git a/src/database/pgsql_common.c b/src/database/pgsql_common.c +index df5d9e3..ee2a476 100755 +--- a/src/database/pgsql_common.c ++++ b/src/database/pgsql_common.c +@@ -156,26 +156,6 @@ static void _destroy_db_key(void *arg) + } + } + +-/* NOTE: Ensure that pgsql_conn->lock is set on function entry */ +-static void _get_last_result(SQLHSTMT stmt) +-{ +- SQLRETURN rc = 0; +- +- while (1) { +- rc = SQLMoreResults(stmt); +- if (rc == SQL_NO_DATA) { +- // arrive the last +- break; +- } else if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { +- SQLCHAR state[PGSQL_STATE_LEN + 1]; +- PGSQL_HANDLE_ERROR("SQLMorestmts", rc, SQL_HANDLE_STMT, stmt, state); +- break; +- } +- } +- +- return ; +-} +- + /* NOTE: Ensure that pgsql_conn->lock is set on function entry */ + static void _get_result_by_index(SQLHSTMT stmt, int index) + { +@@ -323,7 +303,7 @@ static int _pgsql_make_table_current(pgsql_conn_t *pgsql_conn, char *table_name, + char *temp = NULL, *temp2 = NULL; + List keys_list = NULL; + db_key_t *db_key = NULL; +- char* table_prefix[200]; ++ char table_prefix[200]; + memcpy(table_prefix, table_name, 200); + _pgsql_remove_quotes(table_prefix); + +@@ -470,9 +450,9 @@ static int _pgsql_make_table_current(pgsql_conn_t *pgsql_conn, char *table_name, + // update column type + if (!strncmp(fields[i].type, "serial", 6)) { + xstrfmtcat(query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE integer;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + xstrfmtcat(correct_query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE integer;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + + xstrfmtcat(query, "CREATE SEQUENCE IF NOT EXISTS %s_%s_seq OWNED BY %s.%s;", + table_prefix, fields[i].name, table_prefix, fields[i].name); +@@ -485,9 +465,9 @@ static int _pgsql_make_table_current(pgsql_conn_t *pgsql_conn, char *table_name, + table_name, fields[i].name, table_prefix, fields[i].name); + } else if (!strncmp(fields[i].type, "bigserial", 9)) { + xstrfmtcat(query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE bigint;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + xstrfmtcat(correct_query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE bigint;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + + xstrfmtcat(query, "CREATE SEQUENCE IF NOT EXISTS %s_%s_seq OWNED BY %s.%s;", + table_prefix, fields[i].name, table_prefix, fields[i].name); +@@ -530,9 +510,9 @@ static int _pgsql_make_table_current(pgsql_conn_t *pgsql_conn, char *table_name, + + if (!strncmp(fields[i].type, "serial", 6)) { + xstrfmtcat(query, "ALTER TABLE %s ADD \"%s\" integer;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + xstrfmtcat(correct_query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE integer;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + + xstrfmtcat(query, "CREATE SEQUENCE IF NOT EXISTS %s_%s_seq OWNED BY %s.%s;", + table_prefix, fields[i].name, table_prefix, fields[i].name); +@@ -545,9 +525,9 @@ static int _pgsql_make_table_current(pgsql_conn_t *pgsql_conn, char *table_name, + table_name, fields[i].name, table_prefix, fields[i].name); + } else if (!strncmp(fields[i].type, "bigserial", 9)) { + xstrfmtcat(query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE bigint;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + xstrfmtcat(correct_query, "ALTER TABLE %s ALTER COLUMN \"%s\" TYPE bigint;", +- table_name, fields[i].name, fields[i].type); ++ table_name, fields[i].name); + + xstrfmtcat(query, "CREATE SEQUENCE IF NOT EXISTS %s_%s_seq OWNED BY %s.%s;", + table_prefix, fields[i].name, table_prefix, fields[i].name); +@@ -1337,7 +1317,6 @@ extern int pgsql_db_query_check_after(pgsql_conn_t *pgsql_conn, char *query) + extern uint64_t pgsql_db_insert_ret_id(pgsql_conn_t *pgsql_conn, char *query) + { + SQLINTEGER insert_id = 0; +- SQLINTEGER len; + pgsql_res_t *result = NULL; + pgsql_row row; + +@@ -1497,7 +1476,7 @@ extern int pgsql_db_create_table(pgsql_conn_t *pgsql_conn, char *table_name, + } + } + +- debug4("%s rows %d", __func__, rows); ++ debug4("%s %ld", __func__, rows); + return rows; + } + +-- +2.33.0 + diff --git a/slurm.spec b/slurm.spec index 7620852faeda135c4fceaf09599d0f0804206f01..562d4a7d19af2fa17be9fb4d7917040ad3111147 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,6 +1,6 @@ Name: slurm Version: 21.08.8 -%define rel 43 +%define rel 44 Release: %{rel}%{?dist} Summary: Slurm Workload Manager @@ -56,6 +56,7 @@ Patch37: 0037-fix-adding-tres-resource-failure.patch Patch38: 0038-fix-querying-the-user-binding-qos.patch Patch39: 0039-fix-association-GrpTRES-get_parent_limits-errors.patch Patch40: 0040-Remove-redundant-SQL-statements-in-adding-tres.patch +Patch41: 0041-Fix-compilation-warnings.patch # build options .rpmmacros options change to default action # ==================== ==================== ======================== @@ -748,6 +749,9 @@ rm -rf %{buildroot} %systemd_postun_with_restart slurmdbd.service %changelog +* Tue Jun 04 2024 Xing Liu - 21.08.8-44 +- Fix compilation warnings + * Mon Jun 03 2024 Xing Liu - 21.08.8-43 - Remove redundant SQL statements in adding tres