Avoid set_file_attributes sign conversion warnings
This commit is contained in:
parent
da14ccf446
commit
8b9b312dcd
31
Avoid-set_file_attributes-sign-conversion-warnings.patch
Normal file
31
Avoid-set_file_attributes-sign-conversion-warnings.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 8b8b9f002ea665372d7afc505fa2fe2929d0a3fe Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Gruenbacher <agruen@gnu.org>
|
||||||
|
Date: Wed, 7 Feb 2018 12:01:22 +0100
|
||||||
|
Subject: [PATCH] Avoid set_file_attributes sign conversion warnings
|
||||||
|
|
||||||
|
* src/util.c (set_file_attributes): Avoid sign conversion warnings when
|
||||||
|
assigning -1 to uid_t / gid_t.
|
||||||
|
|
||||||
|
Signed-off-by: Xibo.Wang <wangxb12@chinatelecom.cn>
|
||||||
|
---
|
||||||
|
src/util.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/util.c b/src/util.c
|
||||||
|
index a626fdd..0900466 100644
|
||||||
|
--- a/src/util.c
|
||||||
|
+++ b/src/util.c
|
||||||
|
@@ -256,8 +256,8 @@ set_file_attributes (char const *to, enum file_attributes attr,
|
||||||
|
}
|
||||||
|
if (attr & FA_IDS)
|
||||||
|
{
|
||||||
|
- static uid_t euid = -1;
|
||||||
|
- static gid_t egid = -1;
|
||||||
|
+ static uid_t euid = (uid_t)-1;
|
||||||
|
+ static gid_t egid = (gid_t)-1;
|
||||||
|
uid_t uid;
|
||||||
|
uid_t gid;
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: patch
|
Name: patch
|
||||||
Version: 2.7.6
|
Version: 2.7.6
|
||||||
Release: 13
|
Release: 14
|
||||||
Summary: Utiliity which applies a patch file to original files.
|
Summary: Utiliity which applies a patch file to original files.
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/patch/patch.html
|
URL: http://www.gnu.org/software/patch/patch.html
|
||||||
@ -14,6 +14,7 @@ Patch5: Fix-swapping-fake-lines-in-pch_swap.patch
|
|||||||
Patch6: CVE-2018-20969-and-CVE-2019-13638.patch
|
Patch6: CVE-2018-20969-and-CVE-2019-13638.patch
|
||||||
Patch7: CVE-2019-13636.patch
|
Patch7: CVE-2019-13636.patch
|
||||||
Patch8: patch-selinux.patch
|
Patch8: patch-selinux.patch
|
||||||
|
Patch9: Avoid-set_file_attributes-sign-conversion-warnings.patch
|
||||||
|
|
||||||
BuildRequires: gcc libselinux-devel libattr-devel ed
|
BuildRequires: gcc libselinux-devel libattr-devel ed
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-root
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-root
|
||||||
@ -56,6 +57,9 @@ CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE"
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 28 2022 Xibo.Wang <wangxb12@chinatelecom.cn> - 2.7.6-14
|
||||||
|
- Avoid set_file_attributes sign conversion warnings
|
||||||
|
|
||||||
* Wed Oct 19 2022 fuanan <fuanan3@h-partners.com> - 2.7.6-13
|
* Wed Oct 19 2022 fuanan <fuanan3@h-partners.com> - 2.7.6-13
|
||||||
- optimize check by running make in parallel
|
- optimize check by running make in parallel
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user