[Reproducible-commits] [dpkg] 02/37: dselect: Implement delete operator with size argument

Jérémy Bobbio lunar at moszumanska.debian.org
Sun Jan 31 16:28:38 UTC 2016


This is an automated email from the git hooks/post-receive script.

lunar pushed a commit to branch pu/buildinfo
in repository dpkg.

commit c399906c2d576d523deacccd60d6072864279874
Author: Guillem Jover <guillem at debian.org>
Date:   Wed Dec 30 02:18:28 2015 +0100

    dselect: Implement delete operator with size argument
    
    The C++14 spec states that if the delete operator is defined then the
    one with a size argument must also be implemented.
    
    Warned-by: gcc-6
---
 debian/changelog | 2 ++
 dselect/main.cc  | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 8bf6cbd..3fac9b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ dpkg (1.18.5) UNRELEASED; urgency=medium
     This affects «dpkg-deb -z». Closes: #809174
   * Do not abort when traversing symlinks to directories in dpkg-scanpackages
     and dpkg-scansources. Closes: #809219
+  * Implement delete operator with size argument in dselect, required by the
+    C++14 spec when the size-less delete operator is defined.
   * Documentation:
     - Say value instead of option in deb-control(5).
     - Mark debian changelog format in bold in dpkg-parsechangelog(1).
diff --git a/dselect/main.cc b/dselect/main.cc
index 163b388..6c23d1b 100644
--- a/dselect/main.cc
+++ b/dselect/main.cc
@@ -369,6 +369,12 @@ operator delete(void *p) DPKG_ATTR_NOEXCEPT
   free(p);
 }
 
+extern void
+operator delete(void *p, size_t size) DPKG_ATTR_NOEXCEPT
+{
+  free(p);
+}
+
 urqresult urq_list(void) {
   modstatdb_open((modstatdb_rw)(msdbrw_writeifposs |
                                 msdbrw_available_readonly));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list