This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3fd4a7b3b4887c77a6315b724d5a1af6b5cba238 commit 3fd4a7b3b4887c77a6315b724d5a1af6b5cba238 Author: Guillem Jover <[email protected]> AuthorDate: Sat Feb 1 19:34:57 2020 +0100 libdpkg: Add new ATOMIC_FILE_NORMAL enum value to avoid a cast in C++ Warned-by: g++ -Wold-style-cast --- debian/changelog | 1 + dselect/methparse.cc | 2 +- lib/dpkg/atomic-file.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 68eeb3d15..7102efffd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -196,6 +196,7 @@ dpkg (1.20.0) UNRELEASED; urgency=medium - libcompat: Disarm libselinux setexecfilecon() declaration for libcompat-test. - libdpkg: Define new VARBUF_OBJECT macro. + - libdpkg: Add new ATOMIC_FILE_NORMAL enum value to avoid a cast in C++. * Build system: - Bump minimal Perl version to 5.24.1. - Add a serial versioning to the m4 files. diff --git a/dselect/methparse.cc b/dselect/methparse.cc index a667319ca..2db4b98d6 100644 --- a/dselect/methparse.cc +++ b/dselect/methparse.cc @@ -294,7 +294,7 @@ void writecurrentopt() { if (methoptfile == nullptr) internerr("method options filename is nullptr"); - file = atomic_file_new(methoptfile, (enum atomic_file_flags)0); + file = atomic_file_new(methoptfile, ATOMIC_FILE_NORMAL); atomic_file_open(file); if (fprintf(file->fp, "%s %s\n", coption->meth->name, coption->name) == EOF) ohshite(_("unable to write new option to '%.250s'"), file->name_new); diff --git a/lib/dpkg/atomic-file.h b/lib/dpkg/atomic-file.h index 2fd13b758..54ceea1e6 100644 --- a/lib/dpkg/atomic-file.h +++ b/lib/dpkg/atomic-file.h @@ -34,6 +34,7 @@ DPKG_BEGIN_DECLS */ enum atomic_file_flags { + ATOMIC_FILE_NORMAL = 0, ATOMIC_FILE_BACKUP = DPKG_BIT(0), ATOMIC_FILE_MKPATH = DPKG_BIT(1), }; -- Dpkg.Org's dpkg

