From 75cfdf23ea6e8f9e2999d6f8521913624dab2ece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Thu, 23 May 2019 08:26:40 -0700 Subject: [PATCH] [clang] Fix arc lint Reviewed By: jvillard Differential Revision: D15469753 fbshipit-source-id: d41fe0ff3 --- infer/models/objc/src/Dispatch_once.m | 3 ++- infer/tests/codetoanalyze/objc/errors/issues.exp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infer/models/objc/src/Dispatch_once.m b/infer/models/objc/src/Dispatch_once.m index c52bb1660..186d28d60 100644 --- a/infer/models/objc/src/Dispatch_once.m +++ b/infer/models/objc/src/Dispatch_once.m @@ -14,6 +14,7 @@ typedef void (^dispatch_block_t)(void); typedef long dispatch_once_t; -static void _dispatch_once(dispatch_once_t* predicate, __nonnull dispatch_block_t block) { +static void _dispatch_once(dispatch_once_t* predicate, + __nonnull dispatch_block_t block) { block(); } diff --git a/infer/tests/codetoanalyze/objc/errors/issues.exp b/infer/tests/codetoanalyze/objc/errors/issues.exp index be2787534..975f84986 100644 --- a/infer/tests/codetoanalyze/objc/errors/issues.exp +++ b/infer/tests/codetoanalyze/objc/errors/issues.exp @@ -100,7 +100,7 @@ codetoanalyze/objc/shared/annotations/nonnull_annotations.m, A::test3:, 1, PARAM codetoanalyze/objc/shared/annotations/nullable_annotations.m, User::otherUserName, 2, NULL_DEREFERENCE, B2, ERROR, [start of procedure otherUserName,Skipping otherUser: method has no implementation] codetoanalyze/objc/shared/annotations/nullable_annotations.m, npe_property_nullable, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure npe_property_nullable(),Skipping child: method has no implementation] codetoanalyze/objc/shared/annotations/nullable_annotations_fields.m, A::nullable_field, 3, NULL_DEREFERENCE, B1, ERROR, [start of procedure nullable_field,Skipping getA(): method has no implementation] -codetoanalyze/objc/shared/block/dispatch.m, DispatchA::dispatch_a_block_variable_from_macro_delivers_initialised_object, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure dispatch_a_block_variable_from_macro_delivers_initialised_object,start of procedure dispatch_a_block_variable_from_macro,Skipping _dispatch_once(): empty list of specs,return from a call to DispatchA::dispatch_a_block_variable_from_macro] +codetoanalyze/objc/shared/block/dispatch.m, DispatchA::dispatch_a_block_variable_from_macro_delivers_initialised_object, 3, DIVIDE_BY_ZERO, no_bucket, ERROR, [start of procedure dispatch_a_block_variable_from_macro_delivers_initialised_object,start of procedure dispatch_a_block_variable_from_macro,return from a call to DispatchA::dispatch_a_block_variable_from_macro] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample::blockCapturedVarLeak, 6, MEMORY_LEAK, no_bucket, ERROR, [start of procedure blockCapturedVarLeak,start of procedure block,return from a call to objc_blockMemoryLeakExample::blockCapturedVarLeak_1] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample::createCloseCrossGlyph:, 2, MEMORY_LEAK, no_bucket, ERROR, [start of procedure createCloseCrossGlyph:,Skipping CGRectGetHeight(): method has no implementation] codetoanalyze/objc/shared/memory_leaks_benchmark/MemoryLeakExample.m, MemoryLeakExample::measureFrameSizeForText, 1, MEMORY_LEAK, no_bucket, ERROR, [start of procedure measureFrameSizeForText]