Patch long long format warnings

i9ce
Benjamin A. Beasley 4 years ago
parent 411a3c1921
commit 8e85a8c3c4

@ -0,0 +1,19 @@
On platforms (such as 64-bit Linux), where long long int and long int are both
64-bit, we can have IDL_LL defined to ll (format with %%lld) while
IDL_longlong_t, which is just gint64, may be ultimately defined to long int.
This results in compiler warnings about the mismatch between the long long
format and long parameter, even though the types are compatible. We can fix
this with a cast to long long before formatting.
diff -Naur libIDL-0.8.14-original/parser.y libIDL-0.8.14/parser.y
--- libIDL-0.8.14-original/parser.y 2009-04-18 08:20:37.000000000 -0400
+++ libIDL-0.8.14/parser.y 2021-02-03 12:37:11.067509562 -0500
@@ -1354,7 +1354,7 @@
} else if (value < 0) {
yywarningv (IDL_WARNING1, "Cannot use negative value %"
IDL_LL "d, using %" IDL_LL "d",
- value, -value);
+ (long long) value, (long long) -value);
if (ident)
IDL_tree_warning (ident,
IDL_WARNING1, "From constant declared here");

@ -16,6 +16,13 @@ License: LGPLv2+
# Fix paths reported by the libIDL-config-2 tool to conform with Fedora
# multilib installation paths:
Patch0: %{name}-0.8.6-multilib.patch
# On platforms (such as 64-bit Linux), where long long int and long int are
# both 64-bit, we can have IDL_LL defined to ll (format with %%lld) while
# IDL_longlong_t, which is just gint64, may be ultimately defined to long int.
# This results in compiler warnings about the mismatch between the long long
# format and long parameter, even though the types are compatible. We can fix
# this with a cast to (long long) before formatting.
Patch1: %{name}-0.8.14-long-long-format-warnings.patch
BuildRequires: gcc
BuildRequires: make
@ -91,6 +98,7 @@ rm '%{buildroot}%{_libdir}/%{name}-2.la'
- Drop obsolete %%ldconfig_scriptlets macro
- Use much stricter path globs
- Use %%name macro
- Patch long long format warnings
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.14-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save