* [ANNOUNCE] mwrap 2.2.0
@ 2022-08-22 18:21 6% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-22 18:21 UTC (permalink / raw)
To: mwrap-public; +Cc: Sam Saffron
This release adds Ruby 2.7, 3.0, and 3.1 support.
This also fixes breakage in urcu v0.11.4, v0.12.3, and v0.13.1.
While urcu v0.12.4 and v0.13.2 were released 2022-08-18,
old versions will continue to be in distros for a while
(and urcu v0.11.x won't be updated).
There are also several updates ported from the Perl version.
7 changes since v2.1.0 in 2018:
memalign: perform rcu_read_unlock on ENOMEM
workaround breakage from urcu v0.11.4
constify arg for totals_add_rcu
support Ruby 3.0.x
disable HeapPageBody count test for Ruby 3.1
quiet uninitialized and unused variable warnings
various doc updates
Available via RubyGems and https://80x24.org/mwrap/
(I've Bcc-ed some folks since I'm not sure if their addresses are public)
^ permalink raw reply [relevance 6%]
* [PATCH] quiet uninitialized and unused variable warnings
@ 2022-08-20 22:55 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-20 22:55 UTC (permalink / raw)
To: mwrap-public; +Cc: Sam Saffron
These warnings are already suppressed in similar ways in the
Perl/XS port.
The only warning which remains is related to cfree, which I'm
leaving alone, for now, due to lack of use/test-cases:
../../../../ext/mwrap/mwrap.c:689:6: warning: ‘cfree’ specifies less restrictive attributes than its target ‘free’: ‘leaf’, ‘nothrow’ [-Wmissing-attributes]
689 | void cfree(void *) __attribute__((alias("free")));
| ^~~~~
/usr/include/stdlib.h:565:13: note: ‘cfree’ target declared here
565 | extern void free (void *__ptr) __THROW;
| ^~~~
---
ext/mwrap/mwrap.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c
index cd68eed..a097b2e 100644
--- a/ext/mwrap/mwrap.c
+++ b/ext/mwrap/mwrap.c
@@ -169,11 +169,18 @@ __attribute__((constructor)) static void resolve_malloc(void)
--locating;
}
+#ifdef NDEBUG
+#define QUIET_CC_WARNING(var) (void)var;
+#else
+#define QUIET_CC_WARNING(var)
+#endif
+
static void
mutex_lock(pthread_mutex_t *m)
{
int err = pthread_mutex_lock(m);
assert(err == 0);
+ QUIET_CC_WARNING(err)
}
static void
@@ -181,6 +188,7 @@ mutex_unlock(pthread_mutex_t *m)
{
int err = pthread_mutex_unlock(m);
assert(err == 0);
+ QUIET_CC_WARNING(err)
}
#ifndef HAVE_MEMPCPY
@@ -660,16 +668,14 @@ internal_memalign(void **pp, size_t alignment, size_t size, uintptr_t caller)
static void *
memalign_result(int err, void *p)
{
- if (caa_unlikely(err)) {
+ if (caa_unlikely(err))
errno = err;
- return 0;
- }
return p;
}
void *memalign(size_t alignment, size_t size)
{
- void *p;
+ void *p = NULL;
int err = internal_memalign(&p, alignment, size, RETURN_ADDRESS(0));
return memalign_result(err, p);
}
@@ -684,7 +690,7 @@ void cfree(void *) __attribute__((alias("free")));
void *valloc(size_t size)
{
- void *p;
+ void *p = NULL;
int err = internal_memalign(&p, page_size, size, RETURN_ADDRESS(0));
return memalign_result(err, p);
}
@@ -702,7 +708,7 @@ void *valloc(size_t size)
void *pvalloc(size_t size)
{
size_t alignment = page_size;
- void *p;
+ void *p = NULL;
int err;
if (add_overflow_p(size, alignment)) {
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-20 22:55 7% [PATCH] quiet uninitialized and unused variable warnings Eric Wong
2022-08-22 18:21 6% [ANNOUNCE] mwrap 2.2.0 Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/mwrap.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).