[Bug 240398] -D_XOPEN_SOURCE=500 incorrectly warns about missing snprintf()

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sat Sep 7 22:41:14 UTC 2019


--- Comment #1 from Jan Beich <jbeich at FreeBSD.org> ---
Real world example from a library bundled with Firefox:

$ git clone https://github.com/kinetiknz/cubeb
$ cd cubeb
$ CFLAGS="-isystem/usr/local/include" LDFLAGS="-L/usr/local/lib" cmake .
$ make
src/cubeb_alsa.c:564:9: warning: implicitly declaring library function
'snprintf' with type 'int (char *, unsigned long, const char *, ...)'
    r = snprintf(node_name, sizeof(node_name), "pcm.%s", string);
$ fgrep XOPEN src/cubeb_alsa.c
#define _XOPEN_SOURCE 500

I cannot fix the warning upstream because neither Linux nor other BSDs are

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-standards mailing list