(Commit message below adapted from libnbd commit fda38988b86b, "vector:
introduce DEFINE_POINTER_VECTOR_TYPE()", 2023-02-28).
The "name##_iter" function is used 5 times in nbdkit as follows:
string_vector_iter (..., (void *) free);
Casting "free" to (void*) is ugly. (Well-defined by POSIX, but
(Reimplement libnbd commit c7ff70101e8c, "convert
string_vector_(iter(free) + reset()) to string_vector_empty()",
2023-02-28.)
Convert the 5 string_vector_(iter(free) + reset()) call sites mentioned
previously to string_vector_empty().
Note that the converted code performs more cleanup steps in s
We already have two use cases for static assertions (and soon we'll have
yet another). Namely:
- STATIC_ASSERT_UNSIGNED_INT() in "checked-overflow.h". Here, we use our
own trick, based on a negative-sized array typedef that's named with
NBDKIT_UNIQUE_NAME.
- static_assert() in "test-array-siz
From: Eric Blake
Original commit message:
I ran:
$ cppcheck --cppcheck-build-dir=cache/cppcheck -q -I . -I common/include/ \
-I include/ -I lib/ -I common/utils/ -i generator/ .
then inspected the output. cppcheck correctly flags:
copy/file-ops.c:423:10: portability: 'data' is of type 'void
Because the current definition of TYPE_IS_ARRAY() already contains a
negation, defining TYPE_IS_POINTER() in terms of TYPE_IS_ARRAY() would
lead to double negation, which I consider less than ideal style.
Therefore, introduce TYPE_IS_POINTER() from scratch, and rebase
TYPE_IS_ARRAY() on top of TYPE
Original commit message:
Currently, a semicolon after a DEFINE_VECTOR_TYPE(...) macro invocation is
not needed, nor does our documentation in "common/utils/vector.h"
prescribe one. Furthermore, it breaks ISO C, which gcc reports with
"-Wpedantic":
> warning: ISO C does not allow extra ‘;’ outside
From: "Richard W.M. Jones"
Signed-off-by: Laszlo Ersek
(cherry picked from libnbd commit 27a9bb45c70dbb1112cab6bdc1a61b21f78bc6f4)
---
configure.ac | 3 +++
common/include/ispowerof2.h | 13 +
common/include/test-ispowerof2.c | 10 ++
3 files change
From: Nir Soffer
Original commit message:
Update stale comments to use `len` instead of `size`.
Fixes: commit cc0567e9aed7e6b40a44bf8eac0a262ac7314fec
Signed-off-by: Nir Soffer
Porting notes:
(1) Libnbd commit cc0567e9aed7 ("common/utils/vector: Rename `size` to
`len`", 2021-10-31) renamed t
This is the counterpart series for
[libnbd PATCH 0/6] common: catch up with nbdkit
20230301114027.336230-1-lersek@redhat.com">http://mid.mail-archive.com/20230301114027.336230-1-lersek@redhat.com
Contrarily to my prognosis in that cover letter, this series does
ultimately extend up to libnbd
On 3/2/23 22:59, Richard W.M. Jones wrote:
> On Thu, Mar 02, 2023 at 08:52:33PM +0200, Andrey Drobyshev wrote:
>> On 3/2/23 20:36, Richard W.M. Jones wrote:
>>> I can probably do an outline of a patch if you need it, but
>>> not today.
>>
>> Yes, sure. But speaking of the ways to influence the beh
On Thu, Mar 02, 2023 at 08:52:33PM +0200, Andrey Drobyshev wrote:
> On 3/2/23 20:36, Richard W.M. Jones wrote:
> > I can probably do an outline of a patch if you need it, but
> > not today.
>
> Yes, sure. But speaking of the ways to influence the behaviour of a
> command line tool: there're also
On 3/2/23 20:36, Richard W.M. Jones wrote:
> On Thu, Mar 02, 2023 at 08:15:37PM +0200, Andrey Drobyshev wrote:
>> On 2/28/23 16:39, Richard W.M. Jones wrote:
>>> On Tue, Feb 28, 2023 at 03:24:46PM +0100, Laszlo Ersek wrote:
On 2/28/23 14:01, Richard W.M. Jones wrote:
> On Wed, Feb 22, 2023
On Thu, Mar 02, 2023 at 08:15:37PM +0200, Andrey Drobyshev wrote:
> On 2/28/23 16:39, Richard W.M. Jones wrote:
> > On Tue, Feb 28, 2023 at 03:24:46PM +0100, Laszlo Ersek wrote:
> >> On 2/28/23 14:01, Richard W.M. Jones wrote:
> >>> On Wed, Feb 22, 2023 at 08:20:43PM +0200, Andrey Drobyshev wrote:
On 2/28/23 16:39, Richard W.M. Jones wrote:
> On Tue, Feb 28, 2023 at 03:24:46PM +0100, Laszlo Ersek wrote:
>> On 2/28/23 14:01, Richard W.M. Jones wrote:
>>> On Wed, Feb 22, 2023 at 08:20:43PM +0200, Andrey Drobyshev wrote:
Since commits b28cd1dc ("Remove requested_guestcaps / rcaps"), f0afc4
On Thu, Mar 2, 2023 at 10:46 AM Richard W.M. Jones wrote:
>
> On Mon, Feb 27, 2023 at 07:09:33PM +0200, Nir Soffer wrote:
> > On Mon, Feb 27, 2023 at 6:41 PM Richard W.M. Jones
> > wrote:
> > > I think it would be more useful if (or in addition) it could compute
> > > the checksum of a stream wh
On 3/1/23 23:10, Eric Blake wrote:
> On Wed, Mar 01, 2023 at 06:43:11PM +0100, Laszlo Ersek wrote:
>> On 3/1/23 17:54, Eric Blake wrote:
>>> I took the easy route of crippling what I couldn't get working, on the
>>> grounds that partial coverage is better than none now that we have
>>> Cirrus CI ch
ACK series, thanks for fixing this.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
___
On Mon, Feb 27, 2023 at 07:09:33PM +0200, Nir Soffer wrote:
> On Mon, Feb 27, 2023 at 6:41 PM Richard W.M. Jones wrote:
> > I think it would be more useful if (or in addition) it could compute
> > the checksum of a stream which is being converted with 'qemu-img
> > convert'. Extra points if it ca
18 matches
Mail list logo