]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_keychain/regressions/kc-30-xara-helpers.h
Security-58286.260.20.tar.gz
[apple/security.git] / OSX / libsecurity_keychain / regressions / kc-30-xara-helpers.h
index 05c329c26c73019eeaf6e7549490ab302e8d7e3d..affd4fc6e91030b5e2c9a09eefa5714f6a145c5a 100644 (file)
@@ -37,7 +37,7 @@
 #pragma clang diagnostic ignored "-Wunused-function"
 
 /* name is the name of the test, not the name of the keychain */
-static SecKeychainRef newKeychain(const char * name) {
+static CF_RETURNS_RETAINED SecKeychainRef newKeychain(const char * name) {
     SecKeychainRef kc = NULL;
     char* password = "password";
 
@@ -74,7 +74,7 @@ static SecKeychainRef newCustomKeychain(const char * name, const char * path, co
 }
 #define newCustomKeychainTests 1
 
-static SecKeychainRef openCustomKeychain(const char * name, const char * path, const char * password) {
+static CF_RETURNS_RETAINED SecKeychainRef openCustomKeychain(const char * name, const char * path, const char * password) {
     SecKeychainRef kc = NULL;
     ok_status(SecKeychainOpen(path, &kc), "%s: SecKeychainOpen", name);
 
@@ -88,7 +88,7 @@ static SecKeychainRef openCustomKeychain(const char * name, const char * path, c
 }
 #define openCustomKeychainTests 2
 
-static SecKeychainRef openKeychain(const char * name) {
+static CF_RETURNS_RETAINED SecKeychainRef openKeychain(const char * name) {
     return openCustomKeychain(name, keychainName, NULL);
 }
 #define openKeychainTests (openCustomKeychainTests)
@@ -225,7 +225,7 @@ static void checkHashesMatch(const char* name, SecKeychainItemRef item, SecKeych
 }
 #define checkHashesMatchTests (getIntegrityHashTests + getIntegrityHashTests + 1)
 
-#pragma clang pop
+#pragma clang diagnostic pop
 #else
 
 #endif /* TARGET_OS_MAC */