After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730120 - Excess initializers in contacts-types.c
Excess initializers in contacts-types.c
Status: RESOLVED DUPLICATE of bug 642350
Product: vala
Classification: Core
Component: general
0.32.x
Other All
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-14 11:03 UTC by mt
Modified: 2017-03-02 10:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description mt 2014-05-14 11:03:39 UTC
During a rebuild of all Debian packages in a clean sid chroot (and
cowbuilder+pbuilder) the build failed with the following error. Please note that
we use our research compiler tool-chain (using tools from the cbmc package),
which permits extended reporting on type inconsistencies at link time.

[...]
gcc -DHAVE_CONFIG_H -I. -I..  -include config.h -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/telepathy-1.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/nss -I/usr/include/nspr -I/usr/include/libsecret-1 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/goa-1.0 -I/usr/lib/x86_64-linux-gnu/goa-1.0/include -I/usr/include/gee-0.8 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/gnome-desktop-3.0 -I/usr/include/evolution-data-server -I/usr/include/gsettings-desktop-schemas  -I../libgd -DLOCALEDIR=\""/usr/share/locale"\" -DPKGDATADIR=\""/usr/share/gnome-contacts"\" -DPKGLIBDIR=\""/usr/lib/gnome-contacts"\" -DGNOME_DESKTOP_USE_UNSTABLE_API  -D_REENTRANT -pthread -I/usr/include/cheese -I/usr/include/gtk-3.0 -I/usr/include/clutter-gtk-1.0 -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/cheese -I/usr/include/clutter-gst-2.0 -I/usr/include/gstreamer-1.0 -I/usr/include/clutter-1.0 -I/usr/include/cogl -I/usr/include/atk-1.0 -I/usr/include/cogl -I/usr/include/json-glib-1.0 -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include  -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -c -o contacts-types.o contacts-types.c

file contacts-types.c line 212: structure member designator 2 out of bounds (2)
CONVERSION ERROR

Looking at recent build logs, even GCC reports a whole range of these:

https://buildd.debian.org/status/fetch.php?pkg=gnome-contacts&arch=amd64&ver=3.12.0-1%2Bb1&stamp=1398540939

It seems all of these relate to the _ContactsTypeSetInitData type:

http://sources.debian.net/src/gnome-contacts/3.12.0-1/src/contacts-types.c?hl=85,86,87,88#L85

Either the initializers or the type should be fixed.

Best,
Michael
Comment 1 Laurent Bigonville 2016-04-17 11:17:43 UTC
This might actually be a vala compiler issue
Comment 2 Laurent Bigonville 2016-04-17 11:30:09 UTC
The code in gnome-contacts look something like:

public class foo : Object  {
  private struct InitData {
    unowned string display_name_u;
    unowned string types[3];
  }
	private const InitData[] general_data = {
		{ N_("Home"), { "HOME" } },
		{ N_("Work"), { "WORK" } }
	};
}


The generated C code looks like:

struct _fooInitData {
        const gchar* display_name_u;
        const gchar* types[3];
};

static const fooInitData FOO_general_data[2] = {{"Home", {"HOME"}, 3}, {"Work", {"WORK"}, 3}};
Comment 3 Rico Tzschichholz 2017-03-02 10:29:55 UTC

*** This bug has been marked as a duplicate of bug 642350 ***