From a6837fbc6d16bc06e50f747b6dc4765dcf814112 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 19 Mar 2024 11:49:26 +0100 Subject: [PATCH] Fix format warnings on 32 bit systems --- gass/transfer/source/configure.ac | 6 +++--- .../source/library/globus_gass_transfer_http.c | 10 +++++----- .../source/library/globus_l_gass_transfer_http.h | 2 +- gridftp/client/source/configure.ac | 4 ++-- gridftp/client/source/test/partial-read-all-test.c | 4 ++-- gridftp/client/source/test/read-all-test.c | 4 ++-- packaging/debian/globus-ftp-client/debian/changelog.in | 6 ++++++ .../debian/globus-gass-transfer/debian/changelog.in | 6 ++++++ packaging/fedora/globus-ftp-client.spec | 5 ++++- packaging/fedora/globus-gass-transfer.spec | 5 ++++- 10 files changed, 35 insertions(+), 17 deletions(-) diff --git a/gass/transfer/source/configure.ac b/gass/transfer/source/configure.ac index 81a3b077fd..840358b801 100644 --- a/gass/transfer/source/configure.ac +++ b/gass/transfer/source/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.60]) -AC_INIT([globus_gass_transfer],[9.4],[https://github.com/gridcf/gct/issues]) +AC_INIT([globus_gass_transfer],[9.5],[https://github.com/gridcf/gct/issues]) AC_CONFIG_MACRO_DIR([m4]) AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}]) AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}]) @@ -25,6 +25,6 @@ AC_CONFIG_FILES( globus-gass-transfer.pc Makefile library/Doxyfile - library/Makefile - version.h) + library/Makefile + version.h) AC_OUTPUT diff --git a/gass/transfer/source/library/globus_gass_transfer_http.c b/gass/transfer/source/library/globus_gass_transfer_http.c index 31686125e1..9cf0b17d19 100644 --- a/gass/transfer/source/library/globus_gass_transfer_http.c +++ b/gass/transfer/source/library/globus_gass_transfer_http.c @@ -314,8 +314,8 @@ globus_l_gass_transfer_http_send( /* send chunk header and footer as an iovec array */ sprintf((char *) new_proto->iov[0].iov_base, - "%lx%s", - (long) new_proto->user_buflen, + "%zx%s", + new_proto->user_buflen, CRLF); new_proto->iov[0].iov_len = strlen((char *) new_proto->iov[0].iov_base); @@ -1728,7 +1728,7 @@ globus_l_gass_transfer_http_request_refer( GLOBUS_L_HTML_HEADER); offset += sprintf(referral_string + offset, GLOBUS_L_CONTENT_LENGTH_HEADER, - (long) body_count); + body_count); offset += sprintf(referral_string + offset, CRLF); @@ -1838,7 +1838,7 @@ globus_l_gass_transfer_http_request_deny( GLOBUS_L_HTML_HEADER); offset += sprintf(deny_string + offset, GLOBUS_L_CONTENT_LENGTH_HEADER, - (long) body_count); + body_count); offset += sprintf(deny_string + offset, CRLF); @@ -1941,7 +1941,7 @@ globus_l_gass_transfer_http_request_authorize( { offset += sprintf(authorize_string + offset, GLOBUS_L_CONTENT_LENGTH_HEADER, - (long) length); + length); } offset += sprintf(authorize_string + offset, CRLF); diff --git a/gass/transfer/source/library/globus_l_gass_transfer_http.h b/gass/transfer/source/library/globus_l_gass_transfer_http.h index e3c2447102..0492eb96c3 100644 --- a/gass/transfer/source/library/globus_l_gass_transfer_http.h +++ b/gass/transfer/source/library/globus_l_gass_transfer_http.h @@ -128,7 +128,7 @@ static char * globus_l_gass_transfer_http_subject_name; #define GLOBUS_L_DEFAULT_DENIAL_MESSAGE "Internal Server Error" -#define GLOBUS_L_CONTENT_LENGTH_HEADER "Content-Length: %ld" CRLF +#define GLOBUS_L_CONTENT_LENGTH_HEADER "Content-Length: %zu" CRLF #define GLOBUS_L_CHUNKED_HEADER "Transfer-Encoding: chunked" CRLF #define GLOBUS_L_BINARY_HEADER "Content-Type: " \ "application/octet-stream" CRLF diff --git a/gridftp/client/source/configure.ac b/gridftp/client/source/configure.ac index 9b4a74e49c..feeaa43da5 100644 --- a/gridftp/client/source/configure.ac +++ b/gridftp/client/source/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.60]) -AC_INIT([globus_ftp_client],[9.8],[https://github.com/gridcf/gct/issues]) +AC_INIT([globus_ftp_client],[9.9],[https://github.com/gridcf/gct/issues]) AC_CONFIG_MACRO_DIR([m4]) AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}]) AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}]) @@ -112,6 +112,6 @@ AC_CONFIG_FILES( Makefile Doxyfile test/Makefile - version.h + version.h test/testcred.cnf) AC_OUTPUT diff --git a/gridftp/client/source/test/partial-read-all-test.c b/gridftp/client/source/test/partial-read-all-test.c index 1247c767ba..1d438dab37 100644 --- a/gridftp/client/source/test/partial-read-all-test.c +++ b/gridftp/client/source/test/partial-read-all-test.c @@ -60,7 +60,7 @@ intermediate_cb( globus_off_t offset, globus_bool_t eof) { - printf("intermediate cb: [%"GLOBUS_OFF_T_FORMAT",%ld]\n", offset, length); + printf("intermediate cb: [%"GLOBUS_OFF_T_FORMAT",%zu]\n", offset, length); fwrite(buffer, 1, length, stdout); } static @@ -74,7 +74,7 @@ data_cb( globus_off_t offset, globus_bool_t eof) { - printf("[%"GLOBUS_OFF_T_FORMAT",%ld]\n", offset, length); + printf("[%"GLOBUS_OFF_T_FORMAT",%zu]\n", offset, length); fwrite(buffer, 1, length - offset, stdout); } diff --git a/gridftp/client/source/test/read-all-test.c b/gridftp/client/source/test/read-all-test.c index 1dfc5739bf..bbf2a7873d 100644 --- a/gridftp/client/source/test/read-all-test.c +++ b/gridftp/client/source/test/read-all-test.c @@ -60,7 +60,7 @@ intermediate_cb( globus_off_t offset, globus_bool_t eof) { - printf("intermediate cb: [%"GLOBUS_OFF_T_FORMAT",%ld]\n", offset, length); + printf("intermediate cb: [%"GLOBUS_OFF_T_FORMAT",%zu]\n", offset, length); fwrite(buffer, 1, length, stdout); } static @@ -74,7 +74,7 @@ data_cb( globus_off_t offset, globus_bool_t eof) { - printf("[%"GLOBUS_OFF_T_FORMAT",%ld]\n", offset, length); + printf("[%"GLOBUS_OFF_T_FORMAT",%zu]\n", offset, length); fwrite(buffer, 1, length, stdout); } diff --git a/packaging/debian/globus-ftp-client/debian/changelog.in b/packaging/debian/globus-ftp-client/debian/changelog.in index 82e227f14c..a08929e63f 100644 --- a/packaging/debian/globus-ftp-client/debian/changelog.in +++ b/packaging/debian/globus-ftp-client/debian/changelog.in @@ -1,3 +1,9 @@ +globus-ftp-client (9.9-1+gct.@distro@) @distro@; urgency=medium + + * Fix format warnings on 32 bit systems + + -- Mattias Ellert Fri, 01 Mar 2024 11:13:14 +0100 + globus-ftp-client (9.8-1+gct.@distro@) @distro@; urgency=medium * Fix some compiler and doxygen warnings diff --git a/packaging/debian/globus-gass-transfer/debian/changelog.in b/packaging/debian/globus-gass-transfer/debian/changelog.in index c484f31bdc..d12fad55c8 100644 --- a/packaging/debian/globus-gass-transfer/debian/changelog.in +++ b/packaging/debian/globus-gass-transfer/debian/changelog.in @@ -1,3 +1,9 @@ +globus-gass-transfer (9.5-1+gct.@distro@) @distro@; urgency=medium + + * Fix format warnings on 32 bit systems + + -- Mattias Ellert Fri, 01 Mar 2024 11:09:20 +0100 + globus-gass-transfer (9.4-1+gct.@distro@) @distro@; urgency=medium * Fix some compiler and doxygen warnings diff --git a/packaging/fedora/globus-ftp-client.spec b/packaging/fedora/globus-ftp-client.spec index c11b20d192..eb4f3b4ef5 100644 --- a/packaging/fedora/globus-ftp-client.spec +++ b/packaging/fedora/globus-ftp-client.spec @@ -3,7 +3,7 @@ Name: globus-ftp-client %global soname 2 %global _name %(echo %{name} | tr - _) -Version: 9.8 +Version: 9.9 Release: 1%{?dist} Summary: Grid Community Toolkit - GridFTP Client Library @@ -169,6 +169,9 @@ GLOBUS_HOSTNAME=localhost make %{?_smp_mflags} check VERBOSE=1 %doc %{_pkgdocdir}/GLOBUS_LICENSE %changelog +* Fri Mar 01 2024 Mattias Ellert - 9.9-1 +- Fix format warnings on 32 bit systems + * Wed Mar 09 2022 Mattias Ellert - 9.8-1 - Fix some compiler and doxygen warnings diff --git a/packaging/fedora/globus-gass-transfer.spec b/packaging/fedora/globus-gass-transfer.spec index 9d6a0f45c8..054c69b3c8 100644 --- a/packaging/fedora/globus-gass-transfer.spec +++ b/packaging/fedora/globus-gass-transfer.spec @@ -3,7 +3,7 @@ Name: globus-gass-transfer %global soname 2 %global _name %(echo %{name} | tr - _) -Version: 9.4 +Version: 9.5 Release: 1%{?dist} Summary: Grid Community Toolkit - Globus Gass Transfer @@ -131,6 +131,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la %doc %{_pkgdocdir}/GLOBUS_LICENSE %changelog +* Fri Mar 01 2024 Mattias Ellert - 9.5-1 +- Fix format warnings on 32 bit systems + * Wed Mar 09 2022 Mattias Ellert - 9.4-1 - Fix some compiler and doxygen warnings