X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flibsigrok-internal.h;h=6ce868834b0aab26b087d6cd130c20c4ec32f479;hb=d4c937749a92ce6defa2f0095b34692181afe597;hp=a18ccf6ae47787a7858d687f6ded1aadcdb0d080;hpb=a24c3f4a899d61a6bfc837a1969dbacf42e2ea72;p=libsigrok.git diff --git a/src/libsigrok-internal.h b/src/libsigrok-internal.h index a18ccf6a..6ce86883 100644 --- a/src/libsigrok-internal.h +++ b/src/libsigrok-internal.h @@ -143,6 +143,15 @@ libusb_handle_events_timeout(ctx, tv) #endif +/* Static definitions of structs ending with an all-zero entry are a + * problem when compiling with -Wmissing-field-initializers: GCC + * suppresses the warning only with { 0 }, clang wants { } */ +#ifdef __clang__ +#define ALL_ZERO { } +#else +#define ALL_ZERO { 0 } +#endif + struct sr_context { #ifdef HAVE_LIBUSB_1_0 libusb_context *libusb_ctx; @@ -205,11 +214,8 @@ struct sr_output_module { /** * Returns a NULL-terminated list of options this module can take. * Can be NULL, if the module has no options. - * - * If cached is TRUE, no new GVariants are created for the def and - * values fields; instead, the current values are returned. */ - struct sr_option *(*options) (gboolean cached); + const struct sr_option *(*options) (void); /** * This function is called once, at the beginning of an output stream.