[Webkit-unassigned] [Bug 233040] New: Some C++ source files use #pragma once

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 12 06:08:52 PST 2021


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

            Bug ID: 233040
           Summary: Some C++ source files use #pragma once
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

Given that “#pragma once” is intended to be used only in headers (or, more
precisely, in files that get “#include”'d), it does not make sense to make
use of it inside implementation .cpp files, yet it is present in a few:

  % rg --files-with-matches --glob '*.cpp' '^#pragma once' Source/ 
  Source/WebKit/WebProcess/WebCoreSupport/WebCaptionPreferencesDelegate.cpp
  Source/WebCore/Modules/WebGPU/GPURenderPassEncoder.cpp
  Source/WebCore/Modules/WebGPU/GPURenderBundleEncoder.cpp
  Source/WebCore/Modules/WebGPU/GPUQueue.cpp
  Source/WebCore/Modules/WebGPU/GPUQuerySet.cpp
  Source/WebCore/Modules/WebGPU/GPUComputePassEncoder.cpp
  Source/WebCore/Modules/WebGPU/GPUCommandEncoder.cpp
  Source/WebCore/Modules/WebGPU/GPUBuffer.cpp
  Source/WebCore/page/PerformanceNavigationTiming.cpp
  %

At least GCC 11.1 will warn about these spurious uses.

-- 
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/20211112/25146e8e/attachment.htm>


More information about the webkit-unassigned mailing list