[systemd-devel] [systemd-commits] man/sd_journal_query_unique.xml

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Thu Oct 18 14:44:43 PDT 2012


On Thu, Oct 18, 2012 at 10:41:56PM +0200, Lennart Poettering wrote:
> On Thu, 18.10.12 21:19, Zbigniew Jędrzejewski-Szmek (zbyszek at in.waw.pl) wrote:
> > Compiling the example from the man pages:
> > list.c:21:20: warning: passing argument 2 of ‘sd_journal_enumerate_unique’ from incompatible pointer type [enabled by default]
> > In file included from list.c:3:0:
> > /usr/include/systemd/sd-journal.h:123:5: note: expected ‘const void **’ but argument is of type ‘const char **’
> > 
> > Using const char** in the API seems nicer.
> 
> Well, the journal is binary safe. You can even stick NUL bytes into
> it. Hence we use "void*" rather than "char*" wherever things could be
> binary...
Makes sense. I'll push a small fix to make the example compile without
warnings.

Zbyszek


More information about the systemd-devel mailing list