Many compile warning occurred in ENABLE(NETWORK_CACHE). ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.h:87:45: warning: missing initializer for member 'WebKit::NetworkCache::Storage::Record::key' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.h:87:45: warning: missing initializer for member 'WebKit::NetworkCache::Storage::Record::timeStamp' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.h:87:45: warning: missing initializer for member 'WebKit::NetworkCache::Storage::Record::header' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheEntry.h:87:45: warning: missing initializer for member 'WebKit::NetworkCache::Storage::Record::body' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:109:18: warning: missing initializer for member 'WebKit::NetworkCache::BlobStorage::Blob::data' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheBlobStorage.cpp:109:18: warning: missing initializer for member 'WebKit::NetworkCache::BlobStorage::Blob::hash' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp:107:18: warning: missing initializer for member 'WebKit::NetworkCache::FileTimes::creation' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp:107:18: warning: missing initializer for member 'WebKit::NetworkCache::FileTimes::modification' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp:110:18: warning: missing initializer for member 'WebKit::NetworkCache::FileTimes::creation' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheFileSystem.cpp:110:18: warning: missing initializer for member 'WebKit::NetworkCache::FileTimes::modification' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:763:51: warning: missing initializer for member 'WebKit::NetworkCache::Storage::RecordInfo::bodySize' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:763:51: warning: missing initializer for member 'WebKit::NetworkCache::Storage::RecordInfo::worth' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:763:51: warning: missing initializer for member 'WebKit::NetworkCache::Storage::RecordInfo::bodyShareCount' [-Wmissing-field-initializers] ../../Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:763:51: warning: missing initializer for member 'WebKit::NetworkCache::Storage::RecordInfo::bodyHash' [-Wmissing-field-initializers]
Created attachment 256285 [details] Patch
Comment on attachment 256285 [details] Patch No, please don’t do this. Could you explain this warning?
-Wmissing-field-initializers Warn if a structure's initializer has some fields missing. For example, the following code causes such a warning, because "x.h" is implicitly zero: struct s { int f, g, h; }; struct s x = { 3, 4 }; This option does not warn about designated initializers, so the following modification does not trigger a warning: struct s { int f, g, h; }; struct s x = { .f = 3, .g = 4 }; In C++ this option does not warn either about the empty { } initializer, for example: struct s { int f, g, h; }; s x = { }; This warning is included in -Wextra. To get other -Wextra warnings without this one, use -Wextra -Wno-missing-field-initializers. But a quick check of NetworkCacheBlobStorage.cpp and NetworkCacheFileSystem.cpp shows that it's warning about { } even though it says it should not. That's odd.
I got this warnings when compiling the webkitgtk+ port. gtk+ didn't use the -Wno-missing-field-initializers options. According to comment of Michael Catanzaro, { } does not warn in C++. That's odd. I use the ubuntu 15.04.
(In reply to comment #3) > In C++ this option does not warn either about the empty { } > initializer, for example: > > struct s { int f, g, h; }; > s x = { }; > > This warning is included in -Wextra. To get other -Wextra > warnings > without this one, use -Wextra -Wno-missing-field-initializers. > > But a quick check of NetworkCacheBlobStorage.cpp and > NetworkCacheFileSystem.cpp shows that it's warning about { } even though it > says it should not. That's odd. Unfortunately it is a GCC 5 only feature. GCC 4.9 still complains with empty initializers. :(
(In reply to comment #5) > (In reply to comment #3) > > > In C++ this option does not warn either about the empty { } > > initializer, for example: > > > > struct s { int f, g, h; }; > > s x = { }; > > > > This warning is included in -Wextra. To get other -Wextra > > warnings > > without this one, use -Wextra -Wno-missing-field-initializers. > > > > But a quick check of NetworkCacheBlobStorage.cpp and > > NetworkCacheFileSystem.cpp shows that it's warning about { } even though it > > says it should not. That's odd. > > Unfortunately it is a GCC 5 only feature. > GCC 4.9 still complains with empty initializers. :( I tried to build with NETWORK_CACHE but build error was occurred by this warning in EFL. Do we wait for ubuntu 15.10?