On Fri, Nov 13, 2015 at 02:13:35PM -0500, Zeeshan Ali (Khattak) wrote: > Hi, > > >> + guint settime_flags; > >> + > >> + g_return_val_if_fail(GVIR_IS_DOMAIN(dom), FALSE); > >> + g_return_val_if_fail(err == NULL || *err == NULL, FALSE); > > > > I'd keep a g_return_val_if_fail(flags == 0, FALSE); > > But doesn't that make G_GNUC_UNUSED declaration wrong then? I think > it's more important to optimize it out rather than ensuring programmer > doesn't pass wrong value by mistake, here. G_GNUC_UNUSED indicates that a value _may_ be unused, it's not a programmer's promise that it is actually unused. Checking that flags actually is 0 is useful if someone passes a wrong flag by mistake, and then people copy and paste that code in other places. The wrong flag could then be forced into ABI you have to keep compat with forever if changing it would break people's applications badly. Christophe
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list