Bug 135096

Summary: Checker: Value stored to 'kernResult' is never read (LayoutTestHelper.m:164)
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Tools / TestsAssignee: David Kilzer (:ddkilzer) <ddkilzer>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, andersca, ap, benjamin, buildbot, rniwa, simon.fraser, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch v1
ap: review+, ap: commit-queue-
Patch for EWS
none
Patch for EWS v2
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 none

Description David Kilzer (:ddkilzer) 2014-07-19 09:47:09 PDT
Clang static analyzer warning in LayoutTestHelper.m:164:

    kernResult = IOServiceOpen(serviceObject, mach_task_self(), 1, &permanentLockDownService);
    ^
Value stored to 'kernResult' is never read
Comment 1 David Kilzer (:ddkilzer) 2014-07-19 09:58:22 PDT
Created attachment 235171 [details]
Patch v1
Comment 2 Alexey Proskuryakov 2014-07-19 10:37:26 PDT
Comment on attachment 235171 [details]
Patch v1

/Volumes/Data/EWS/WebKit/Tools/DumpRenderTree/mac/LayoutTestHelper.m:171:5: error: implicit declaration of function 'ASSERT_UNUSED' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    ASSERT_UNUSED(kernResult, kernResult == KERN_SUCCESS);
Comment 3 David Kilzer (:ddkilzer) 2014-07-19 14:04:38 PDT
Created attachment 235173 [details]
Patch for EWS
Comment 4 David Kilzer (:ddkilzer) 2014-07-19 14:57:13 PDT
Created attachment 235175 [details]
Patch for EWS v2
Comment 5 Build Bot 2014-07-19 16:02:13 PDT
Comment on attachment 235175 [details]
Patch for EWS v2

Attachment 235175 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4541862459211776

New failing tests:
media/W3C/video/networkState/networkState_during_loadstart.html
Comment 6 Build Bot 2014-07-19 16:02:18 PDT
Created attachment 235177 [details]
Archive of layout-test-results from webkit-ews-11 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-11  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 7 Build Bot 2014-07-19 17:08:34 PDT
Comment on attachment 235175 [details]
Patch for EWS v2

Attachment 235175 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4957766691061760

New failing tests:
media/W3C/video/src/src_reflects_attribute_not_source_elements.html
Comment 8 Build Bot 2014-07-19 17:08:39 PDT
Created attachment 235178 [details]
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-10  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 9 David Kilzer (:ddkilzer) 2014-07-20 08:08:45 PDT
Committed r171277: <http://trac.webkit.org/changeset/171277>
Comment 10 David Kilzer (:ddkilzer) 2014-07-20 08:17:37 PDT
(In reply to comment #9)
> Committed r171277: <http://trac.webkit.org/changeset/171277>

Had to change the last ASSERT_UNUSED() to an if statement that called NSLog if the call to IOObjectRelease() fails.