Bug 198544

Summary: Fix miscellaneous build warnings
Product: WebKit Reporter: Michael Catanzaro <mcatanzaro>
Component: WebKitGTKAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, commit-queue, don.olmstead, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch none

Michael Catanzaro
Reported 2019-06-04 14:43:45 PDT
[2321/4597] Building CXX object Source...sources/UnifiedSource-15db4ad9-2.cpp.o In file included from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-15db4ad9-2.cpp:2: ../../Source/JavaScriptCore/wasm/WasmInstance.cpp: In constructor ‘JSC::Wasm::Instance::Instance(JSC::Wasm::Context*, WTF::Ref<JSC::Wasm::Module>&&, JSC::EntryFrame**, void**, JSC::Wasm::Instance::StoreTopCallFrameCallback&&)’: ../../Source/JavaScriptCore/wasm/WasmInstance.cpp:58:68: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘union JSC::Wasm::Instance::GlobalValue’; use assignment instead [-Wclass-memaccess] 58 | memset(m_globals.get(), 0, globalMemoryByteSize(m_module.get())); | ^ In file included from ../../Source/JavaScriptCore/wasm/WasmInstance.cpp:27, from DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-15db4ad9-2.cpp:2: ../../Source/JavaScriptCore/wasm/WasmInstance.h:157:11: note: ‘union JSC::Wasm::Instance::GlobalValue’ declared here 157 | union GlobalValue { | ^~~~~~~~~~~ [3455/4592] Building CXX object Source...sources/UnifiedSource-5037b3e8-2.cpp.o In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32, from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25, from ../../Source/WebCore/config.h:50, from ../../Source/WebCore/contentextensions/ContentExtensionStyleSheet.cpp:26, from DerivedSources/WebCore/unified-sources/UnifiedSource-5037b3e8-2.cpp:1: ../../Source/WebCore/contentextensions/DFABytecodeCompiler.cpp: In member function ‘void WebCore::ContentExtensions::DFABytecodeCompiler::compile()’: ../../Source/WebCore/contentextensions/DFABytecodeCompiler.cpp:464:36: warning: comparison of integer expressions of different signedness: ‘uint32_t’ {aka ‘unsigned int’} and ‘int’ [-Wsign-compare] 464 | RELEASE_ASSERT(destination < std::numeric_limits<int32_t>::max()); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/Assertions.h:333:11: note: in definition of macro ‘ASSERT’ 333 | if (!(assertion)) { \ | ^~~~~~~~~ ../../Source/WebCore/contentextensions/DFABytecodeCompiler.cpp:464:9: note: in expansion of macro ‘RELEASE_ASSERT’ 464 | RELEASE_ASSERT(destination < std::numeric_limits<int32_t>::max()); | ^~~~~~~~~~~~~~ [3572/4592] Building CXX object Source...sources/UnifiedSource-84c9f43f-1.cpp.o In file included from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:32, from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25, from ../../Source/WebCore/config.h:50, from ../../Source/WebCore/inspector/CommandLineAPIHost.cpp:31, from DerivedSources/WebCore/unified-sources/UnifiedSource-84c9f43f-1.cpp:1: ../../Source/WebCore/inspector/InspectorCanvas.cpp: In member function ‘int WebCore::InspectorCanvas::indexForData(WebCore::InspectorCanvas::DuplicateDataVariant)’: ../../Source/WebCore/inspector/InspectorCanvas.cpp:435:22: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 435 | ASSERT(index < std::numeric_limits<int>::max()); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/Assertions.h:333:11: note: in definition of macro ‘ASSERT’ 333 | if (!(assertion)) { \ | ^~~~~~~~~ ../../Source/WebCore/inspector/InspectorCanvas.cpp:529:18: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare] 529 | ASSERT(index < std::numeric_limits<int>::max()); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DerivedSources/ForwardingHeaders/wtf/Assertions.h:333:11: note: in definition of macro ‘ASSERT’ 333 | if (!(assertion)) { \ | ^~~~~~~~~ [3711/4592] Building CXX object Source...sources/UnifiedSource-42f7b70e-4.cpp.o In file included from DerivedSources/WebCore/unified-sources/UnifiedSource-42f7b70e-4.cpp:1: ../../Source/WebCore/xml/XSLStyleSheetLibxslt.cpp: In member function ‘bool WebCore::XSLStyleSheet::parseString(const WTF::String&)’: ../../Source/WebCore/xml/XSLStyleSheetLibxslt.cpp:148:66: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare] 148 | if (unsignedSize.hasOverflowed() || unsignedSize.unsafeGet() > std::numeric_limits<int>::max()) | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [4108/4592] Building CXX object Source...sources/UnifiedSource-72468c22-7.cpp.o In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-7.cpp:1: ../../Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp: In function ‘WTF::Optional<std::array<unsigned char, 8> > WebKit::NetworkCache::readOrMakeSalt(const WTF::String&)’: ../../Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp:186:19: warning: comparison of integer expressions of different signedness: ‘long int’ and ‘std::array<unsigned char, 8>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 186 | if (bytesRead != salt.size()) { | ~~~~~~~~~~^~~~~~~~~~~~~~ ../../Source/WebKit/NetworkProcess/cache/NetworkCacheData.cpp:191:60: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘std::array<unsigned char, 8>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 191 | bool success = write(fd, salt.data(), salt.size()) == salt.size(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ [4434/4592] Building CXX object Tools/...dle.dir/gtk/PlatformUtilitiesGtk.cpp.o In file included from ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtk.h:100, from ../../Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:29: ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtkfilechooserbutton.h:66:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses] 66 | void (*__gtk_reserved1); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtkfilechooserbutton.h:67:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses] 67 | void (*__gtk_reserved2); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtkfilechooserbutton.h:68:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses] 68 | void (*__gtk_reserved3); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtkfilechooserbutton.h:69:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses] 69 | void (*__gtk_reserved4); | ^ In file included from ../DependenciesGTK/Root/include/gtk-3.0/gtk/gtk.h:271, from ../../Tools/TestWebKitAPI/gtk/PlatformUtilitiesGtk.cpp:29: ../DependenciesGTK/Root/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:74:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved1’ [-Wparentheses] 74 | void (*__gtk_reserved1); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:75:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved2’ [-Wparentheses] 75 | void (*__gtk_reserved2); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:76:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved3’ [-Wparentheses] 76 | void (*__gtk_reserved3); | ^ ../DependenciesGTK/Root/include/gtk-3.0/gtk/deprecated/gtkstatusicon.h:77:8: warning: unnecessary parentheses in declaration of ‘__gtk_reserved4’ [-Wparentheses] 77 | void (*__gtk_reserved4); | ^
Attachments
Patch (8.28 KB, patch)
2019-06-04 14:50 PDT, Michael Catanzaro
no flags
Michael Catanzaro
Comment 1 2019-06-04 14:50:39 PDT
Don Olmstead
Comment 2 2019-06-04 15:30:11 PDT
Comment on attachment 371340 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=371340&action=review r=me with nits > Tools/TestWebKitAPI/PlatformGTK.cmake:110 > +set(TestJSC_SYSTEM_INCLUDE_DIRECTORIES > + ${GLIB_INCLUDE_DIRS} > + ${GTK3_INCLUDE_DIRS} > +) > + > set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES > ${CMAKE_BINARY_DIR} > ${TESTWEBKITAPI_DIR} > - ${GLIB_INCLUDE_DIRS} > - ${GTK3_INCLUDE_DIRS} > ${THIRDPARTY_DIR}/gtest/include This was copy pasted in PlatformWPE.cmake. this need updating as well?
Michael Catanzaro
Comment 3 2019-06-04 19:44:21 PDT
PlatformWPE.cmake has: set(TestJSC_PRIVATE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR} ${TESTWEBKITAPI_DIR} ${THIRDPARTY_DIR}/gtest/include ${FORWARDING_HEADERS_DIR} ${FORWARDING_HEADERS_DIR}/JavaScriptCore ${FORWARDING_HEADERS_DIR}/JavaScriptCore/glib ${DERIVED_SOURCES_JAVASCRIPCOREWPE_DIR} ) No system includes there. Looks good. Well, it's surely a bug that it includes ${GLIB_LIBRARIES} and ${GLIB_GMODULE_LIBRARIES} in TestJSC_LIBRARIES but not ${GLIB_INCLUDE_DIRS}, but I'm not brave enough to look at that.
WebKit Commit Bot
Comment 4 2019-06-04 20:14:26 PDT
Comment on attachment 371340 [details] Patch Clearing flags on attachment: 371340 Committed r246095: <https://trac.webkit.org/changeset/246095>
WebKit Commit Bot
Comment 5 2019-06-04 20:14:27 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.