On Wed, Aug 14, 2019 at 06:44:37AM -0500, Eric Blake wrote:
#define NBD_NULL_COMPLETION \
(nbd_completion_callback) { .callback = NULL, .user_data = NULL }
depending on how likely it is that someone might be using our header
with a compiler mode that warns on an initializer that doesn't fully
specify everything.
Then, whether we go with a generic generator fix, or an open-coded
one-liner, the rest of your patch changes via:
s/NBD_NULL_CALLBACK(completion)/NBD_NULL_COMPLETION/
OK I'll fix this.
Would it ease typing if we added a macro:
NBD_COMPLETION (finished_read, &buffers[i])
This is not really much different from:
(nbd_completion_callback) { finished_read, &buffers[i] }
which is fine to use now that I've rearranged the struct fields
(in my local copy).
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW