disusered / cordova-safe

File encryption for Cordova.
MIT License
35 stars 22 forks source link

conflicting types for 'SecRandomCopyBytes' #24

Open monkeychops opened 6 years ago

monkeychops commented 6 years ago

Anyone else seen this? Using Xcode 9.2

Ionic project

/app/Plugins/cordova-safe/RNCryptor.m:31:12: error: conflicting types for 'SecRandomCopyBytes' extern int SecRandomCopyBytes(SecRandomRef rnd, size_t count, uint8_t *bytes) __attribute__((weak_import)); ^ In module 'Security' imported from /app/Plugins/cordova-safe/RNCryptor.h:30: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.2.sdk/System/Library/Frameworks/Security.framework/Headers/SecRandom.h:59:5: note: previous declaration is here int SecRandomCopyBytes(SecRandomRef __nullable rnd, size_t count, void *bytes) ^ /app/Plugins/cordova-safe/RNCryptor.m:361:7: warning: comparison of function 'SecRandomCopyBytes' not equal to a null pointer is always true [-Wtautological-pointer-compare] if (SecRandomCopyBytes != NULL) { ^~~~~~~~~~~~~~~~~~ ~~~~ /app/Plugins/cordova-safe/RNCryptor.m:361:7: note: prefix with the address-of operator to silence this warning if (SecRandomCopyBytes != NULL) { ^ &