[Webkit-unassigned] [Bug 231880] [GTK][WPE] Support setting status code and getting HTTP method in custom URI scheme handlers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 29 17:09:06 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231880

--- Comment #29 from Michael Catanzaro <mcatanzaro at gnome.org> ---
Comment on attachment 442655
  --> https://bugs.webkit.org/attachment.cgi?id=442655
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=442655&action=review

>>> Source/WebKit/UIProcess/API/glib/WebKitURISchemeResponse.cpp:91
>>> +    gint64 streamLength;
>> 
>> Move this to the case PROP_STREAM_LENGTH
> 
> If I do this when compiling using Clang 12.0.1, the compiler will complain about (GCC does not report this one though):
> (Line numbers are from the newer patch)
> 
> ```
> WebKitURISchemeResponse.cpp:83:13: warning: Cannot jump from switch statement to this case label clang(switch_into_protected_scope)
> WebKitURISchemeResponse.cpp:78:16: note: Jump bypasses variable initialization
> ```
> 
> I am not sure if this is a false-positive from the compiler?

Well that warning message seems clearly wrong, but perhaps you can silence it by adding braces?

case PROP_STREAM_LENGTH: {
    // ...
    break;
}

This will limit the scope of the variable to only the 'case PROP_STREAM_LENGTH', which was the goal behind moving it anyway.

Good job iterating on all the feedback btw. The strict code style requirements keep things more maintainable.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211030/5590e8d5/attachment.htm>


More information about the webkit-unassigned mailing list