[Webkit-unassigned] [Bug 282193] Suppress various unsafe buffer usage warnings

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 28 12:18:54 PDT 2024


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

Michael Catanzaro <mcatanzaro at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|error: the two-parameter    |Suppress various unsafe
                   |std::span construction is   |buffer usage warnings
                   |unsafe as it can introduce  |
                   |mismatch between buffer     |
                   |size and the bound          |
                   |information                 |
                   |[-Werror,-Wunsafe-buffer-us |
                   |age-in-container]           |

--- Comment #2 from Michael Catanzaro <mcatanzaro at redhat.com> ---
And these:

/home/mcatanzaro/Projects/WebKit/Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp:124:30: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage]
  124 |     const char* rawCommand = gtkDeleteCommands[deleteType][direction];
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/mcatanzaro/Projects/WebKit/Source/WebKit/UIProcess/gtk/KeyBindingTranslator.cpp:85:26: error: 'gtkDeleteCommands' is an unsafe buffer that does not perform bounds checks [-Werror,-Wunsafe-buffer-usage]
   85 | static const char* const gtkDeleteCommands[][2] = {
      | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
   86 |     { "DeleteBackward",               "DeleteForward"                        }, // Characters
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   87 |     { "DeleteWordBackward",           "DeleteWordForward"                    }, // Word ends
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   88 |     { "DeleteWordBackward",           "DeleteWordForward"                    }, // Words
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   89 |     { "DeleteToBeginningOfLine",      "DeleteToEndOfLine"                    }, // Lines
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   90 |     { "DeleteToBeginningOfLine",      "DeleteToEndOfLine"                    }, // Line ends
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   91 |     { "DeleteToBeginningOfParagraph", "DeleteToEndOfParagraph"               }, // Paragraph ends
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   92 |     { "DeleteToBeginningOfParagraph", "DeleteToEndOfParagraph"               }, // Paragraphs
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   93 |     { 0,                              0                                      } // Whitespace (M-\ in Emacs)
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   94 | };
      | ~

-- 
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/20241028/c7e39446/attachment.htm>


More information about the webkit-unassigned mailing list