diff options
| author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-06 11:59:46 +0200 |
|---|---|---|
| committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-06-06 11:59:46 +0200 |
| commit | 4b7fee3d2940323e865ca335a83d660829bd75ec (patch) | |
| tree | 2ab16861abe458409299b8cb10ac93c3f9e603ae /debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch | |
| parent | 60fbfb5cee47763d4c1dd831f66b853f2b5755cd (diff) | |
add patch series
Diffstat (limited to 'debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch')
| -rw-r--r-- | debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch b/debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch new file mode 100644 index 00000000..29fb7f94 --- /dev/null +++ b/debian/patches/0001-include-use-unsigned-literal-in-combination-with-bin.patch @@ -0,0 +1,37 @@ +From 027bc17eca80bd379663e645aa9a7c59573bf0de Mon Sep 17 00:00:00 2001 +From: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Fri, 6 Jun 2014 10:20:47 +0200 +Subject: [PATCH 1/9] include: use unsigned literal in combination with binary + not + +* include/refcount.h (refcounts_promote): Use ~0U. +(refcounts_demote): Likewise. +--- + include/refcount.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/include/refcount.h b/include/refcount.h +index 5c3302d..785b052 100644 +--- a/include/refcount.h ++++ b/include/refcount.h +@@ -160,7 +160,7 @@ refcounts_promote (refcounts_t *ref, struct references *result) + So we just add a hard reference. In combination, this is the + desired operation. */ + const union _references op = +- { .references = { .weak = ~0, .hard = 1} }; ++ { .references = { .weak = ~0U, .hard = 1} }; + union _references r; + r.value = __atomic_add_fetch (&ref->value, op.value, __ATOMIC_RELAXED); + assert (r.references.hard != UINT32_MAX || !"refcount overflowed!"); +@@ -188,7 +188,7 @@ refcounts_demote (refcounts_t *ref, struct references *result) + significant bits. When we add ~0 to the hard references, it will + overflow into the weak references. This is the desired + operation. */ +- const union _references op = { .references = { .hard = ~0 } }; ++ const union _references op = { .references = { .hard = ~0U } }; + union _references r; + r.value = __atomic_add_fetch (&ref->value, op.value, __ATOMIC_RELAXED); + assert (r.references.hard != UINT32_MAX || !"refcount underflowed!"); +-- +2.0.0.rc2 + |
