title: GTK+ 3.0 warning: missing initializer for field ‘padding’ of ‘GActionEntry’
body: <p>I'm going through this <a href="https://developer.gnome.org/gtk3/stable/ch01s05.html" rel="nofollow noreferrer">tutorial</a> from gnome gtk+ website, I'm new to gtk+ and not that advanced in c. I'm having some problems with this bit of code:</p>
  <pre><code>   static GActionEntry app_entries[] = {
          {&quot;preferences&quot;, preferences_activated, NULL, NULL, NULL},
          {&quot;quit&quot;, quit_activated, NULL, NULL, NULL}
      };
  </code></pre>
  <p>When i compile it with <code>-Wextra -Wall -g -O2 -pedantic-errors</code>, it throws the missing initializer warning:</p>
  <pre><code>gcc -c -o app.o -Wextra -Wall -O2 -pedantic-errors -g `pkg-config --cflags gtk+-3.0` app.c
  app.c:38:2: warning: missing initializer for field ‘padding’ of ‘GActionEntry’ [-Wmissing-field-initializers]
    { &quot;preferences&quot;, preferences_activated, NULL, NULL, NULL },
    ^
  In file included from /usr/include/glib-2.0/gio/gio.h:31:0,
                   from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
                   from /usr/include/gtk-3.0/gdk/gdk.h:32,
                   from /usr/include/gtk-3.0/gtk/gtk.h:30,
                   from app.c:1:
  /usr/include/glib-2.0/gio/gactionmap.h:72:9: note: ‘padding’ declared here
     gsize padding[3];
           ^
  app.c:39:2: warning: missing initializer for field ‘padding’ of ‘GActionEntry’ [-Wmissing-field-initializers]
    { &quot;quit&quot;, quit_activated, NULL, NULL, NULL }
    ^
  In file included from /usr/include/glib-2.0/gio/gio.h:31:0,
                   from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
                   from /usr/include/gtk-3.0/gdk/gdk.h:32,
                   from /usr/include/gtk-3.0/gtk/gtk.h:30,
                   from app.c:1:
  /usr/include/glib-2.0/gio/gactionmap.h:72:9: note: ‘padding’ declared here
     gsize padding[3];
           ^
  </code></pre>
  <p>Why am i getting this warning? and how can i fix it?</p>
  <p>Thanks in advance</p>