bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Can't compile gettext 0.18.1.1 due to format string issues in libcroco a


From: Tobias Mueller
Subject: Can't compile gettext 0.18.1.1 due to format string issues in libcroco and libgrep
Date: Sat, 29 Jan 2011 14:07:09 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

Hello,

I can't compile gettext 0.18.1.1 due to format string issues in libcroco and 
libgrep:

libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -DEXEEXT=\"\" -DEXEEXT=\"\" 
-DEXEEXT=\"\" -I. -I.. -I../intl -I../intl -I.. -I.. -DDEPENDS_ON_LIBICONV=1 
-DDEPENDS_ON_LIBINTL=1 -I../intl -I///usr/include/libxml2 -I./libcroco -g3 
-pipe -O0 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter 
-Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wshadow 
-Wwrite-strings -Winline -Wformat -Wformat-nonliteral -Wformat-security 
-Werror=format-security -Wfatal-errors -Winit-self -Wmissing-include-dirs 
-Wundef -Waggregate-return -Wmissing-format-attribute -Wnested-externs -c 
libcroco/cr-statement.c  -fPIC -DPIC -o 
libcroco/.libs/libcroco_rpl_la-cr-statement.o
In file included from ./glibconfig.h:129,
                 from ./glib/gtypes.h:35,
                 from ./glib/ghash.h:35,
                 from ./glib.h:52,
                 from libcroco/cr-utils.h:28,
                 from libcroco/cr-utils.c:25:
./xalloc.h:64: warning: "__STRICT_ANSI__" is not defined
./xalloc.h:81: warning: "HAVE_INLINE" is not defined
In file included from ./glibconfig.h:129,
                 from ./glib/gtypes.h:35,
                 from ./glib/ghash.h:35,
                 from ./glib.h:52,
                 from libcroco/cr-utils.h:28,
                 from libcroco/cr-statement.h:25,
                 from libcroco/cr-statement.c:26:
./xalloc.h:64: warning: "__STRICT_ANSI__" is not defined
./xalloc.h:81: warning: "HAVE_INLINE" is not defined
In file included from ./glibconfig.h:129,
                 from ./glib/gtypes.h:35,
                 from ./glib/ghash.h:35,
                 from ./glib.h:52,
                 from libcroco/cr-utils.h:28,
                 from libcroco/cr-token.h:27,
                 from libcroco/cr-token.c:32:
./xalloc.h:64: warning: "__STRICT_ANSI__" is not defined
./xalloc.h:81: warning: "HAVE_INLINE" is not defined
libcroco/cr-statement.c: In function ‘cr_statement_ruleset_to_string’:
libcroco/cr-statement.c:606: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c:617: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c: In function ‘cr_statement_font_face_rule_to_string’:
libcroco/cr-statement.c:673: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c: In function ‘cr_statement_at_page_rule_to_string’:
libcroco/cr-statement.c:774: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c: In function ‘cr_statement_media_rule_to_string’:
libcroco/cr-statement.c:815: warning: declaration of ‘str’ shadows a previous 
local
libcroco/cr-statement.c:800: warning: shadowed declaration is here
libcroco/cr-statement.c:816: warning: pointer targets in initialization differ 
in signedness
libcroco/cr-statement.c: In function ‘cr_statement_import_rule_to_string’:
libcroco/cr-statement.c:868: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c:905: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c:909: warning: pointer targets in return differ in 
signedness
libcroco/cr-statement.c: In function 
‘cr_statement_does_buf_parses_against_core’:
libcroco/cr-statement.c:937: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function ‘cr_statement_ruleset_parse_from_buf’:
libcroco/cr-statement.c:1057: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function 
‘cr_statement_at_media_rule_parse_from_buf’:
libcroco/cr-statement.c:1194: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function 
‘cr_statement_at_import_rule_parse_from_buf’:
libcroco/cr-statement.c:1380: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function ‘cr_statement_at_page_rule_parse_from_buf’:
libcroco/cr-statement.c:1509: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function 
‘cr_statement_at_charset_rule_parse_from_buf’:
libcroco/cr-statement.c:1625: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function 
‘cr_statement_font_face_rule_parse_from_buf’:
libcroco/cr-statement.c:1722: warning: pointer targets in passing argument 1 of 
‘strlen’ differ in signedness
/usr/include/string.h:399: note: expected ‘const char *’ but argument is of 
type ‘const guchar *’
libcroco/cr-statement.c: In function ‘cr_statement_dump_ruleset’:
libcroco/cr-statement.c:2608: warning: pointer targets in assignment differ in 
signedness
libcroco/cr-statement.c:2610: warning: pointer targets in passing argument 2 of 
‘fprintf’ differ in signedness
/usr/include/stdio.h:353: note: expected ‘const char * restrict’ but argument 
is of type ‘guchar *’
libcroco/cr-statement.c:2610: error: format not a string literal and no format 
arguments
compilation terminated due to -Wfatal-errors.
make[1]: *** [libcroco/libcroco_rpl_la-cr-statement.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory 
`/home/muelli/vcs/gnome/gettext-0.18.1.1/gettext-tools/gnulib-lib'
make: *** [all] Error 2


Or


make[4]: Entering directory 
`/home/muelli/vcs/gnome/gettext-0.18.1.1/gettext-tools/libgrep'
\
    gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I.. -I../gnulib-lib 
-I../gnulib-lib -I../intl   -g3 -pipe -O0 -Wall -Wextra 
-Wno-missing-field-initializers -Wno-unused-parameter -Wold-style-definition 
-Wmissing-declarations -Wredundant-decls -Wshadow -Wwrite-strings -Winline 
-Wformat -Wformat-nonliteral -Wformat-security -Werror=format-security 
-Wfatal-errors -Winit-self -Wmissing-include-dirs -Wundef -Waggregate-return 
-Wmissing-format-attribute -Wnested-externs -c m-fgrep.c
In file included from m-fgrep.c:39:
../gnulib-lib/xalloc.h:64: warning: "__STRICT_ANSI__" is not defined
../gnulib-lib/xalloc.h:81: warning: "HAVE_INLINE" is not defined
In file included from m-fgrep.c:41:
../gnulib-lib/gettext.h:185: warning: "__STRICT_ANSI__" is not defined
../gnulib-lib/gettext.h: In function ‘dcpgettext_expr’:
../gnulib-lib/gettext.h:209: warning: "__STRICT_ANSI__" is not defined
../gnulib-lib/gettext.h:224: warning: "__STRICT_ANSI__" is not defined
../gnulib-lib/gettext.h: In function ‘dcnpgettext_expr’:
../gnulib-lib/gettext.h:255: warning: "__STRICT_ANSI__" is not defined
../gnulib-lib/gettext.h:270: warning: "__STRICT_ANSI__" is not defined
m-fgrep.c: In function ‘Fcompile’:
m-fgrep.c:109: error: format not a string literal and no format arguments
compilation terminated due to -Wfatal-errors.
make[4]: *** [m-fgrep.o] Error 1


The attached patches helped me to compile, but I don't know whether they are 
semantically correct.


Cheers,
   Tobi

Attachment: gettext-formatstring.patch
Description: Text Data

Attachment: gettext-formatstring-libgrep-fgrep.patch
Description: Text Data

Attachment: gettext-formatstring-libgrep-regex.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]