On Thu, Sep 29, 2022 at 09:10:21AM +0100, Richard W.M. Jones wrote:
>
> How about this alternate to patch 1.
>
> I have also adjusted a later patch so it no longer sets
> attribute((nonnull)) on the queries parameter of
> nbd_internal_set_querylist, so that function is unchanged
> from before.
>
How about this alternate to patch 1.
I have also adjusted a later patch so it no longer sets
attribute((nonnull)) on the queries parameter of
nbd_internal_set_querylist, so that function is unchanged
from before.
Also the tests pass.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
OK now I remember what the problem was.
> @@ -255,7 +257,9 @@ int
> nbd_unlocked_opt_set_meta_context (struct nbd_handle *h,
> nbd_context_callback *context)
> {
> - return nbd_unlocked_opt_set_meta_context_queries (h, NULL, context);
In this original code
Let me try an alternate version of this.
The problem is that I was getting GCC warnings even before adding the
annotation to nbd_internal_set_querylist. Somehow the annotation on
the public function "leaked" through to the internal function.
Rich.
--
Richard Jones, Virtualization Group, Red
On Wed, Sep 28, 2022 at 06:25:34PM +0100, Richard W.M. Jones wrote:
> StringList parameters (char ** in C) will be marked with
> __attribute__((nonnull)). To pass an empty list you have to use a
> list containing a single NULL element, not a NULL pointer.
>
> nbd_internal_set_querylist has also