gstreamer 1.6.0 compile error (g_strdup_vprintf)
Nicolas Dufresne
nicolas.dufresne at collabora.com
Wed Sep 30 07:52:20 PDT 2015
This looks CLang bug to me.
gchar* g_strdup_vprintf (const gchar *format,
va_list args) G_GNUC_PRINTF(1, 0) G_GNUC_MALLOC;
A vprintf function is used to relay a printf function. Enforcing that
format be a literal is wrong. For GCC, this is an evidence:
-Wformat-nonliteral
If -Wformat is specified, also warn if the format string is not a string literal and so cannot be checked, unless the format
function takes its format arguments as a "va_list".
I'd say, meanwhile disable this warning when building with clang (or
disable error on warning). And file a bug against clang (if not already
fixed in newer versions.
cheers,
Nicolas
p.s. options are CFLAGS="-Wno-error" or CFLAGS="-Wno-format-nonliteral"
set at configuration time.
Le lundi 28 septembre 2015 à 14:09 +0000, Steve Yun (윤종희) a écrit :
> Hi there,
>
> I meet compile error when compiling gstreamer 1.6.0.
>
> CC libgstcheck_1.0_la-gstbufferstraw.lo
> CC libgstcheck_1.0_la-gstcheck.lo
> gstcheck.c:1033:27: error: format string is not a string literal [
> -Werror,-Wformat-nonliteral]
> msg = g_strdup_vprintf (expr, args);
> ^~~~
> 1 error generated.
> make[5]: *** [libgstcheck_1.0_la-gstcheck.lo] Error 1
> make[4]: *** [all-recursive] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all-recursive] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> gstreamer$
>
> I modified "-Wno-format-nonliteral" in configure.ac but I meet clang:
> error: argument unused during compilation: '-pthread' error on Mac.
>
> What do I need to compile on Mac?
>
> Thanks in advance.
> Steve.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150930/047c64e9/attachment.sig>
More information about the gstreamer-devel
mailing list