Bug 192336 - Fix some unused parameter warnings
Summary: Fix some unused parameter warnings
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-12-03 15:00 PST by Don Olmstead
Modified: 2018-12-03 18:31 PST (History)
19 users (show)

See Also:


Attachments
Patch (5.98 KB, patch)
2018-12-03 15:36 PST, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (5.95 KB, patch)
2018-12-03 15:37 PST, Don Olmstead
no flags Details | Formatted Diff | Diff
Patch (5.56 KB, patch)
2018-12-03 16:10 PST, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2018-12-03 15:00:35 PST
Found these while building for PlayStation.
Comment 1 Don Olmstead 2018-12-03 15:36:39 PST Comment hidden (obsolete)
Comment 2 Don Olmstead 2018-12-03 15:37:41 PST
Created attachment 356423 [details]
Patch
Comment 3 Michael Catanzaro 2018-12-03 15:57:42 PST
Comment on attachment 356423 [details]
Patch

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

> Source/WTF/wtf/generic/MemoryPressureHandlerGeneric.cpp:34
> -void MemoryPressureHandler::platformReleaseMemory(Critical)
> +void MemoryPressureHandler::platformReleaseMemory(Critical critical)
>  {
> +    UNUSED_PARAM(critical);
>  }

UNUSED_PARAM() exists for use with #ifdefs. Without #ifdefs, you can just not name the parameter. So I think you didn't need any changes in this hunk.

> Source/WTF/wtf/generic/MemoryPressureHandlerGeneric.cpp:47
>  void MemoryPressureHandler::holdOff(Seconds seconds)
>  {
> +    UNUSED_PARAM(seconds);
>  }

Better to remove the parameter name:

void MemoryPressureHandler::holdOff(Seconds)

> Source/WTF/wtf/generic/MemoryPressureHandlerGeneric.cpp:53
>  void MemoryPressureHandler::respondToMemoryPressure(Critical critical, Synchronous synchronous)
>  {
> +    UNUSED_PARAM(critical);
> +    UNUSED_PARAM(synchronous);
>  }

Again, better to remove the parameter names.

> Source/WebCore/platform/network/curl/CertificateInfo.h:87
>  template<> struct Coder<WebCore::CertificateInfo> {
>      static void encode(Encoder& encoder, const WebCore::CertificateInfo& certificateInfo)
>      {
> +        UNUSED_PARAM(encoder);
> +        UNUSED_PARAM(certificateInfo);
>          notImplemented();
>      }
>  
>      static bool decode(Decoder& decoder, WebCore::CertificateInfo& certificateInfo)
>      {
> +        UNUSED_PARAM(decoder);
> +        UNUSED_PARAM(certificateInfo);
>          notImplemented();
>          return false;
>      }

Again, best just remove the parameter names.
Comment 4 Don Olmstead 2018-12-03 16:10:14 PST
Created attachment 356430 [details]
Patch

Fixing review comments
Comment 5 WebKit Commit Bot 2018-12-03 18:30:35 PST
Comment on attachment 356430 [details]
Patch

Clearing flags on attachment: 356430

Committed r238836: <https://trac.webkit.org/changeset/238836>
Comment 6 WebKit Commit Bot 2018-12-03 18:30:37 PST
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-12-03 18:31:30 PST
<rdar://problem/46440021>