Bug 171273 - [GTK] -Wmissing-field-initializers triggered by RemoteInspectorServer.cpp:128
Summary: [GTK] -Wmissing-field-initializers triggered by RemoteInspectorServer.cpp:128
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-25 07:38 PDT by Michael Catanzaro
Modified: 2017-05-10 07:26 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.36 KB, patch)
2017-04-25 07:39 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff
Patch (3.32 KB, patch)
2017-05-09 08:22 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-04-25 07:38:37 PDT
[1240/5820] Building CXX object Source...emote/glib/RemoteInspectorServer.cpp.o
../../Source/JavaScriptCore/inspector/remote/glib/RemoteInspectorServer.cpp:128:1: warning: missing initializer for member ‘_GDBusInterfaceVTable::padding’ [-Wmissing-field-initializers]
 };
Comment 1 Michael Catanzaro 2017-04-25 07:39:27 PDT
Created attachment 308099 [details]
Patch
Comment 2 Michael Catanzaro 2017-04-25 07:41:26 PDT
This will obviously break if those padding values are ever used, but I think that's OK. It's not really possible to do better since it's a constant.
Comment 3 Carlos Garcia Campos 2017-04-25 08:15:26 PDT
(In reply to Michael Catanzaro from comment #2)
> This will obviously break if those padding values are ever used, but I think
> that's OK. It's not really possible to do better since it's a constant.

Do we want to break the build with future glib versions only to fix a harmless warning? There are two more uses of _GDBusInterfaceVTable, btw.
Comment 4 Michael Catanzaro 2017-04-25 08:27:09 PDT
(In reply to Carlos Garcia Campos from comment #3)
> (In reply to Michael Catanzaro from comment #2)
> > This will obviously break if those padding values are ever used, but I think
> > that's OK. It's not really possible to do better since it's a constant.
> 
> Do we want to break the build with future glib versions only to fix a
> harmless warning? There are two more uses of _GDBusInterfaceVTable, btw.

This is the only case that's emitting a warning for me, so it's the only one I touched. Are other uses allocated differently?

Yes, we definitely want to break future versions of GLib. It's very easy for us to modify the structure initialization in the future if new members are added, which is not even particularly likely. Keeping the build free from warnings is very important; we can't see important warnings if we don't fix smaller ones like this.
Comment 5 Carlos Garcia Campos 2017-04-25 08:37:50 PDT
(In reply to Michael Catanzaro from comment #4)
> (In reply to Carlos Garcia Campos from comment #3)
> > (In reply to Michael Catanzaro from comment #2)
> > > This will obviously break if those padding values are ever used, but I think
> > > that's OK. It's not really possible to do better since it's a constant.
> > 
> > Do we want to break the build with future glib versions only to fix a
> > harmless warning? There are two more uses of _GDBusInterfaceVTable, btw.
> 
> This is the only case that's emitting a warning for me, so it's the only one
> I touched. Are other uses allocated differently?

Nope, we use the same pattern in RemoteInspector, RemoteInspectorServer and RemoteinspectorClient
Comment 6 Michael Catanzaro 2017-05-09 08:22:41 PDT
Created attachment 309497 [details]
Patch
Comment 7 WebKit Commit Bot 2017-05-10 07:26:56 PDT
Comment on attachment 309497 [details]
Patch

Clearing flags on attachment: 309497

Committed r216582: <http://trac.webkit.org/changeset/216582>
Comment 8 WebKit Commit Bot 2017-05-10 07:26:58 PDT
All reviewed patches have been landed.  Closing bug.