- Revision
- 260027
- Author
- [email protected]
- Date
- 2020-04-13 10:53:51 -0700 (Mon, 13 Apr 2020)
Log Message
Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView
<https://webkit.org/b/210427>
Reviewed by Alex Christensen.
Source/WebKit:
* UIProcess/API/Cocoa/WKView.h:
(WKView._unused):
- Use WK_UNUSED_INSTANCE_VARIABLE to ignore unused instance
variable.
Source/WebKitLegacy/mac:
* Misc/WebIconDatabase.h:
(WebIconDatabase._private):
- Use WK_UNUSED_INSTANCE_VARIABLE to ignore unused instance
variable.
Source/WTF:
* wtf/Compiler.h:
(WK_UNUSED_INSTANCE_VARIABLE): Add.
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (260026 => 260027)
--- trunk/Source/WTF/ChangeLog 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WTF/ChangeLog 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,3 +1,13 @@
+2020-04-13 David Kilzer <[email protected]>
+
+ Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView
+ <https://webkit.org/b/210427>
+
+ Reviewed by Alex Christensen.
+
+ * wtf/Compiler.h:
+ (WK_UNUSED_INSTANCE_VARIABLE): Add.
+
2020-04-13 Joonghun Park <[email protected]>
Unreviewed. Remove redundant move in return statement.
Modified: trunk/Source/WTF/wtf/Compiler.h (260026 => 260027)
--- trunk/Source/WTF/wtf/Compiler.h 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WTF/wtf/Compiler.h 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011, 2012, 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -318,6 +318,16 @@
#define PURE_FUNCTION
#endif
+/* WK_UNUSED_INSTANCE_VARIABLE */
+
+#if !defined(WK_UNUSED_INSTANCE_VARIABLE) && COMPILER(GCC_COMPATIBLE)
+#define WK_UNUSED_INSTANCE_VARIABLE __attribute__((unused))
+#endif
+
+#if !defined(WK_UNUSED_INSTANCE_VARIABLE)
+#define WK_UNUSED_INSTANCE_VARIABLE
+#endif
+
/* UNUSED_FUNCTION */
#if !defined(UNUSED_FUNCTION) && COMPILER(GCC_COMPATIBLE)
Modified: trunk/Source/WebKit/ChangeLog (260026 => 260027)
--- trunk/Source/WebKit/ChangeLog 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WebKit/ChangeLog 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,5 +1,17 @@
2020-04-13 David Kilzer <[email protected]>
+ Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView
+ <https://webkit.org/b/210427>
+
+ Reviewed by Alex Christensen.
+
+ * UIProcess/API/Cocoa/WKView.h:
+ (WKView._unused):
+ - Use WK_UNUSED_INSTANCE_VARIABLE to ignore unused instance
+ variable.
+
+2020-04-13 David Kilzer <[email protected]>
+
Add WARN_UNUSED_RETURN to decode methods in Source/WebKit
<https://webkit.org/b/210423>
<rdar://problem/61715582>
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKView.h (260026 => 260027)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKView.h 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKView.h 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -30,6 +30,10 @@
#import <Cocoa/Cocoa.h>
#import <WebKit/WKDeclarationSpecifiers.h>
+#if !defined(WK_UNUSED_INSTANCE_VARIABLE)
+#define WK_UNUSED_INSTANCE_VARIABLE
+#endif
+
@class WKBrowsingContextController;
@class WKBrowsingContextGroup;
@class WKProcessGroup;
@@ -39,7 +43,7 @@
@interface WKView : NSView <NSTextInputClient> {
@private
WKViewData *_data;
- unsigned _unused;
+ WK_UNUSED_INSTANCE_VARIABLE unsigned _unused;
}
- (id)initWithFrame:(NSRect)frame processGroup:(WKProcessGroup *)processGroup browsingContextGroup:(WKBrowsingContextGroup *)browsingContextGroup;
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (260026 => 260027)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,3 +1,15 @@
+2020-04-13 David Kilzer <[email protected]>
+
+ Fix clang static analyzer warnings about unused instance variables in WebIconDatabase, WKView
+ <https://webkit.org/b/210427>
+
+ Reviewed by Alex Christensen.
+
+ * Misc/WebIconDatabase.h:
+ (WebIconDatabase._private):
+ - Use WK_UNUSED_INSTANCE_VARIABLE to ignore unused instance
+ variable.
+
2020-04-11 Wenson Hsieh <[email protected]>
[macOS] [WK1] Touch Bar flashes when typing in Vietnamese in Mail
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h (260026 => 260027)
--- trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h 2020-04-13 17:52:48 UTC (rev 260026)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebIconDatabase.h 2020-04-13 17:53:51 UTC (rev 260027)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005 Apple Inc. All rights reserved.
+ * Copyright (C) 2005-2020 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +34,10 @@
#define ICON_DATABASE_DEPRECATED __deprecated_msg("WebIconDatabase is not API and no longer handles icon loading. It will be removed in a future release.")
+#if !defined(WK_UNUSED_INSTANCE_VARIABLE)
+#define WK_UNUSED_INSTANCE_VARIABLE
+#endif
+
extern NSString *WebIconDatabaseDidAddIconNotification;
extern NSString *WebIconNotificationUserInfoURLKey;
@@ -69,7 +73,7 @@
@interface WebIconDatabase : NSObject {
@private
- WebIconDatabasePrivate *_private;
+ WK_UNUSED_INSTANCE_VARIABLE WebIconDatabasePrivate *_private;
}