Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Sep 2019 22:41:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        standards@FreeBSD.org
Subject:   [Bug 240398] -D_XOPEN_SOURCE=500 incorrectly warns about missing snprintf()
Message-ID:  <bug-240398-99-7Yv4Q8hFWJ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-240398-99@https.bugs.freebsd.org/bugzilla/>
References:  <bug-240398-99@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240398

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

$ git clone https://github.com/kinetiknz/cubeb
$ cd cubeb
$ CFLAGS=3D"-isystem/usr/local/include" LDFLAGS=3D"-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 *, ...)'
[-Wimplicit-function-declaration]
    r =3D 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
affected.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240398-99-7Yv4Q8hFWJ>