Summary: | [GTK][WPE] Fix BubblewrapLauncher clang warnings | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tomas Popela <tpopela> | ||||||
Component: | WebKitGTK | Assignee: | Tomas Popela <tpopela> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bugs-noreply, commit-queue, mcatanzaro | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Tomas Popela
2018-11-28 10:18:52 PST
Created attachment 355886 [details]
Patch
Comment on attachment 355886 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=355886&action=review > Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:474 > - for (size_t i; splitPaths.get()[i]; ++i) > + for (size_t i = 0; splitPaths.get()[i]; ++i) Ow! > Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:574 > - struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, (int)TIOCSTI); > + struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, (scmp_datum_t)TIOCSTI, 0); I spent too long investigating why you have the trailing 0. Would be more clear if we add an unnecessary cast: struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, (scmp_datum_t)TIOCSTI, (scmp_datum_t)0); But now I notice that we are impermissibly using C-style casts here. How about: struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, static_cast<scmp_datum_t>(TIOCSTI), static_cast<scmp_datum_t>(0)); Er, maybe too verbose. It's probably fine with just the first cast. But it should be a static_cast. Comment on attachment 355886 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=355886&action=review >> Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp:574 >> + struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, (scmp_datum_t)TIOCSTI, 0); > > I spent too long investigating why you have the trailing 0. Would be more clear if we add an unnecessary cast: > > struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, (scmp_datum_t)TIOCSTI, (scmp_datum_t)0); > > But now I notice that we are impermissibly using C-style casts here. How about: > > struct scmp_arg_cmp ttyArg = SCMP_A1(SCMP_CMP_EQ, static_cast<scmp_datum_t>(TIOCSTI), static_cast<scmp_datum_t>(0)); > > Er, maybe too verbose. It's probably fine with just the first cast. But it should be a static_cast. True, that sounds a lot better (I don't know, why I didn't do that)! :) Created attachment 355985 [details]
Patch for landing
The commit-queue encountered the following flaky tests while processing attachment 355985 [details]: workers/bomb.html bug 171985 (author: fpizlo@apple.com) The commit-queue is continuing to process your patch. The commit-queue encountered the following flaky tests while processing attachment 355985 [details]: imported/w3c/web-platform-tests/css/css-shapes/shape-outside/values/shape-outside-inset-001.html bug 192139 (author: rego@igalia.com) imported/w3c/web-platform-tests/encoding/legacy-mb-korean/euc-kr/euckr-encode-form.html bug 192140 (author: mjs@apple.com) webgl/1.0.2/conformance/more/conformance/quickCheckAPI-A.html bug 192141 (author: roger_fong@apple.com) The commit-queue is continuing to process your patch. The commit-queue encountered the following flaky tests while processing attachment 355985 [details]: workers/bomb.html bug 171985 (author: fpizlo@apple.com) The commit-queue is continuing to process your patch. Comment on attachment 355985 [details] Patch for landing Clearing flags on attachment: 355985 Committed r238663: <https://trac.webkit.org/changeset/238663> All reviewed patches have been landed. Closing bug. |