Skip to content

Commit

Permalink
Cleanup warnings for Cocoapods
Browse files Browse the repository at this point in the history
  • Loading branch information
rnapier committed Jun 22, 2017
1 parent e0995c5 commit c73a0aa
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions .swift-version
@@ -0,0 +1 @@
3.0
4 changes: 4 additions & 0 deletions Changelog.md
@@ -1,3 +1,7 @@
# Version 3.0.5

# Clean up warnings for CocoaPods

# Version 3.0.4

* Remove non-modular header from framework header #11
Expand Down
2 changes: 1 addition & 1 deletion RNCryptor-objc.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'RNCryptor-objc'
s.version = '3.0.4'
s.version = '3.0.5'
s.summary = 'Encryptor/Decryptor for iOS.'
s.authors = {'Rob Napier' => 'robnapier@gmail.com'}
s.license = {
Expand Down
4 changes: 2 additions & 2 deletions RNCryptor.xcodeproj/project.pbxproj
Expand Up @@ -1199,7 +1199,7 @@
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = NO;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -1241,7 +1241,7 @@
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = NO;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down
6 changes: 6 additions & 0 deletions RNCryptor/RNCryptor.m
Expand Up @@ -317,7 +317,10 @@ + (NSData *)keyForPassword:(NSString *)password salt:(NSData *)salt settings:(RN
CCPseudoRandomAlgorithm prf, uint rounds,
uint8_t *derivedKey, size_t derivedKeyLen);

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
PBKDF = CCKeyDerivationPBKDF ?: RN_CCKeyDerivationPBKDF;
#pragma clang diagnostic pop

result = PBKDF(keySettings.PBKDFAlgorithm, // algorithm
passwordData.bytes, // password
Expand Down Expand Up @@ -396,7 +399,10 @@ + (NSData *)randomDataOfLength:(size_t)length
result = SecRandomCopyBytes(NULL, length, data.mutableBytes);
}
else {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunreachable-code"
result = RN_SecRandomCopyBytes(NULL, length, data.mutableBytes);
#pragma clang diagnostic pop
}
NSAssert(result == 0, @"Unable to generate random bytes: %d", errno);

Expand Down

0 comments on commit c73a0aa

Please sign in to comment.