Fix -Wint-in-bool-context warnings
This commit is contained in:
parent
292f2f8300
commit
8da28a1295
24
00297-fix-int-in-bool-context-warnings.patch
Normal file
24
00297-fix-int-in-bool-context-warnings.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
commit fd39e2a6845f33a74fbb0671c434c0d84a5ec2f3
|
||||||
|
Author: Christian Heimes <christian@python.org>
|
||||||
|
Date: Fri Sep 15 20:27:23 2017 +0200
|
||||||
|
|
||||||
|
bpo-31474: Fix -Wint-in-bool-context warnings (#3581)
|
||||||
|
|
||||||
|
Signed-off-by: Christian Heimes <christian@python.org>
|
||||||
|
|
||||||
|
diff --git a/Include/pymem.h b/Include/pymem.h
|
||||||
|
index 10b5bea5eb..2c239df590 100644
|
||||||
|
--- a/Include/pymem.h
|
||||||
|
+++ b/Include/pymem.h
|
||||||
|
@@ -72,9 +72,9 @@ PyAPI_FUNC(void) PyMem_Free(void *);
|
||||||
|
/* Returns NULL to indicate error if a negative size or size larger than
|
||||||
|
Py_ssize_t can represent is supplied. Helps prevents security holes. */
|
||||||
|
#define PyMem_MALLOC(n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
|
||||||
|
- : malloc((n) ? (n) : 1))
|
||||||
|
+ : malloc(((n) != 0) ? (n) : 1))
|
||||||
|
#define PyMem_REALLOC(p, n) ((size_t)(n) > (size_t)PY_SSIZE_T_MAX ? NULL \
|
||||||
|
- : realloc((p), (n) ? (n) : 1))
|
||||||
|
+ : realloc((p), ((n) != 0) ? (n) : 1))
|
||||||
|
#define PyMem_FREE free
|
||||||
|
|
||||||
|
#endif /* PYMALLOC_DEBUG */
|
16
python2.spec
16
python2.spec
@ -112,7 +112,7 @@ Summary: An interpreted, interactive, object-oriented programming language
|
|||||||
Name: %{python}
|
Name: %{python}
|
||||||
# Remember to also rebase python-docs when changing this:
|
# Remember to also rebase python-docs when changing this:
|
||||||
Version: 2.7.14
|
Version: 2.7.14
|
||||||
Release: 7%{?dist}
|
Release: 8%{?dist}
|
||||||
License: Python
|
License: Python
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{python}-libs%{?_isa} = %{version}-%{release}
|
||||||
@ -754,6 +754,14 @@ Patch285: 00285-fix-non-deterministic-read-in-test_pty.patch
|
|||||||
# Fixed upstream: https://bugs.python.org/issue32186
|
# Fixed upstream: https://bugs.python.org/issue32186
|
||||||
Patch287: 00287-fix-thread-hanging-on-inaccessible-nfs-server.patch
|
Patch287: 00287-fix-thread-hanging-on-inaccessible-nfs-server.patch
|
||||||
|
|
||||||
|
# 00297 #
|
||||||
|
# Fix -Wint-in-bool-context warnings that show up when compiling Python
|
||||||
|
# (and, more importantly, Python libraries) with newer GCC.
|
||||||
|
# See https://bugzilla.redhat.com/show_bug.cgi?id=1473425
|
||||||
|
# Fixed upstream: https://github.com/python/cpython/pull/3581
|
||||||
|
Patch297: 00297-fix-int-in-bool-context-warnings.patch
|
||||||
|
|
||||||
|
|
||||||
# (New patches go here ^^^)
|
# (New patches go here ^^^)
|
||||||
#
|
#
|
||||||
# When adding new patches to "python2" and "python3" in Fedora, EL, etc.,
|
# When adding new patches to "python2" and "python3" in Fedora, EL, etc.,
|
||||||
@ -1077,6 +1085,7 @@ mv Modules/cryptmodule.c Modules/_cryptmodule.c
|
|||||||
%patch284 -p1
|
%patch284 -p1
|
||||||
%patch285 -p1
|
%patch285 -p1
|
||||||
%patch287 -p1
|
%patch287 -p1
|
||||||
|
%patch297 -p1
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?_module_build}
|
%if 0%{?_module_build}
|
||||||
@ -1968,7 +1977,10 @@ rm -fr %{buildroot}
|
|||||||
# ======================================================
|
# ======================================================
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Feb 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.14-17
|
* Mon Feb 26 2018 Petr Viktorin <pviktori@redhat.com> - 2.7.14-8
|
||||||
|
- Fix -Wint-in-bool-context warnings
|
||||||
|
|
||||||
|
* Thu Feb 15 2018 Miro Hrončok <mhroncok@redhat.com> - 2.7.14-7
|
||||||
- Move test.support and test.script_helper to python2-libs
|
- Move test.support and test.script_helper to python2-libs
|
||||||
Resolves: rhbz#1528899
|
Resolves: rhbz#1528899
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user