Skip to content

Commit

Permalink
Fix format warnings on 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ellert committed Mar 19, 2024
1 parent e479e51 commit a6837fb
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 17 deletions.
6 changes: 3 additions & 3 deletions gass/transfer/source/configure.ac
Original file line number Diff line number Diff line change
@@ -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##*.}])
Expand All @@ -25,6 +25,6 @@ AC_CONFIG_FILES(
globus-gass-transfer.pc
Makefile
library/Doxyfile
library/Makefile
version.h)
library/Makefile
version.h)
AC_OUTPUT
10 changes: 5 additions & 5 deletions gass/transfer/source/library/globus_gass_transfer_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion gass/transfer/source/library/globus_l_gass_transfer_http.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions gridftp/client/source/configure.ac
Original file line number Diff line number Diff line change
@@ -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##*.}])
Expand Down Expand Up @@ -112,6 +112,6 @@ AC_CONFIG_FILES(
Makefile
Doxyfile
test/Makefile
version.h
version.h
test/testcred.cnf)
AC_OUTPUT
4 changes: 2 additions & 2 deletions gridftp/client/source/test/partial-read-all-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions gridftp/client/source/test/read-all-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
}

Expand Down
6 changes: 6 additions & 0 deletions packaging/debian/globus-ftp-client/debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
globus-ftp-client (9.9-1+gct.@distro@) @distro@; urgency=medium

* Fix format warnings on 32 bit systems

-- Mattias Ellert <[email protected]> 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
Expand Down
6 changes: 6 additions & 0 deletions packaging/debian/globus-gass-transfer/debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
globus-gass-transfer (9.5-1+gct.@distro@) @distro@; urgency=medium

* Fix format warnings on 32 bit systems

-- Mattias Ellert <[email protected]> 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
Expand Down
5 changes: 4 additions & 1 deletion packaging/fedora/globus-ftp-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -169,6 +169,9 @@ GLOBUS_HOSTNAME=localhost make %{?_smp_mflags} check VERBOSE=1
%doc %{_pkgdocdir}/GLOBUS_LICENSE

%changelog
* Fri Mar 01 2024 Mattias Ellert <[email protected]> - 9.9-1
- Fix format warnings on 32 bit systems

* Wed Mar 09 2022 Mattias Ellert <[email protected]> - 9.8-1
- Fix some compiler and doxygen warnings

Expand Down
5 changes: 4 additions & 1 deletion packaging/fedora/globus-gass-transfer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -131,6 +131,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
%doc %{_pkgdocdir}/GLOBUS_LICENSE

%changelog
* Fri Mar 01 2024 Mattias Ellert <[email protected]> - 9.5-1
- Fix format warnings on 32 bit systems

* Wed Mar 09 2022 Mattias Ellert <[email protected]> - 9.4-1
- Fix some compiler and doxygen warnings

Expand Down

0 comments on commit a6837fb

Please sign in to comment.