GNOME Bugzilla – Bug 758552
invalid use of gettext (without domain set)
Last modified: 2016-08-02 19:07:18 UTC
While debugging with watch-gettext tool[1], I found lower mentioned invalid calls of gettext with gettext domain not being set. The problem is reproducible with tests/pixbuf-read in the current GIT master. The most probable reason for it is an invalid definition of _() macro. gdk-pixbuf.c uses #include "gdk-pixbuf-private.h" gdk-pixbuf-private.h includes glib/gi18n.h instead of glib/gi18n-lib.h. [1] https://github.com/openSUSE/watch-gettext # wrap-gettext pseudo-po file # generated: Mon Nov 23 20:08:35 2015 #. [1] dcgettext() #: messages:0x7f4ee73f9070 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The number of samples per pixel" msgstr "The number of samples per pixel" #. [2] dcgettext() #: messages:0x7f4ee73f8e80 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Number of Channels" msgstr "Number of Channels" #. [3] dcgettext() #: messages:0x7f4ee73f9090 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The colorspace in which the samples are interpreted" msgstr "The colorspace in which the samples are interpreted" #. [4] dcgettext() #: messages:0x7f4ee73fbffc # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Colorspace" msgstr "Colorspace" #. [5] dcgettext() #: messages:0x7f4ee73f90c8 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Whether the pixbuf has an alpha channel" msgstr "Whether the pixbuf has an alpha channel" #. [6] dcgettext() #: messages:0x7f4ee73f8ea9 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Has Alpha" msgstr "Has Alpha" #. [7] dcgettext() #: messages:0x7f4ee73f8ebd # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The number of bits per sample" msgstr "The number of bits per sample" #. [8] dcgettext() #: messages:0x7f4ee73f8edb # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Bits per Sample" msgstr "Bits per Sample" #. [9] dcgettext() #: messages:0x7f4ee73f90f0 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The number of columns of the pixbuf" msgstr "The number of columns of the pixbuf" #. [10] dcgettext() #: messages:0x7f4ee73f8efb # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Width" msgstr "Width" #. [11] dcgettext() #: messages:0x7f4ee73f9118 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The number of rows of the pixbuf" msgstr "The number of rows of the pixbuf" #. [12] dcgettext() #: messages:0x7f4ee73f8f07 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Height" msgstr "Height" #. [13] dcgettext() #: messages:0x7f4ee73f9140 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "The number of bytes between the start of a row and the start of the next row" msgstr "The number of bytes between the start of a row and the start of the next row" #. [14] dcgettext() #: messages:0x7f4ee73f8f15 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Rowstride" msgstr "Rowstride" #. [15] dcgettext() #: messages:0x7f4ee73f9190 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "A pointer to the pixel data of the pixbuf" msgstr "A pointer to the pixel data of the pixbuf" #. [16] dcgettext() #: messages:0x7f4ee73f8f29 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Pixels" msgstr "Pixels" #. [17] dcgettext() #: messages:0x7f4ee73f8f37 # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Readonly pixel data" msgstr "Readonly pixel data" #. [18] dcgettext() #: messages:0x7f4ee73f8f4b # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7f4ee69001dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7f4ee68e7834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7f4ee68e7994] msgid "Pixel Bytes" msgstr "Pixel Bytes"
Created attachment 316115 [details] [review] proposed fix This proposed fix fixes all invalid calls except the first one. The first still unfixed one in detail: #. [1] dcgettext() #: messages:0x7fd21da673fe # /usr/lib64/libglib-2.0.so.0(g_dgettext+0x16) [0x7fd21d9d6f76] # /home/sbrabec/TEST/gdk-pixbuf/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so.0(+0x6c65) [0x7fd21ebc9c65] # /usr/lib64/libgobject-2.0.so.0(g_type_class_ref+0x72d) [0x7fd21e0e31dd] # /usr/lib64/libgobject-2.0.so.0(g_object_new_valist+0x5a4) [0x7fd21e0ca834] # /usr/lib64/libgobject-2.0.so.0(g_object_new+0xd4) [0x7fd21e0ca994] # /home/sbrabec/TEST/gdk-pixbuf/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_new_from_data+0xd5) [0x7fd21ebccaf5] # /home/sbrabec/TEST/gdk-pixbuf/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_new+0xd7) [0x7fd21ebca687] # /home/sbrabec/TEST/lib64/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so(+0x3684) [0x7fd21c50a684] # /home/sbrabec/TEST/gdk-pixbuf/gdk-pixbuf/.libs/libgdk_pixbuf-2.0.so.0(gdk_pixbuf_loader_write+0xe4) [0x7fd21ebd1694] # /home/sbrabec/TEST/gdk-pixbuf/tests/.libs/pixbuf-read() [0x400b29] # /lib64/libc.so.6(__libc_start_main+0xf0) [0x7fd21d3fb610] # /home/sbrabec/TEST/gdk-pixbuf/tests/.libs/pixbuf-read() [0x400bd9]
Review of attachment 316115 [details] [review]: looks good, thanks