jeroentrappers / flutter_keychain

A flutter plugin for secure storage on Android via KeyStore and iOS via Keychain
Other
56 stars 41 forks source link

Values of type 'OSStatus' should not be used as format arguments #17

Closed Pe-te closed 3 years ago

Pe-te commented 3 years ago

Getting a weird message when building:

[10:24:26]: ▸ ⚠️  /Users/me/.fluttersdk/.pub-cache/hosted/pub.dartlang.org/flutter_keychain-1.0.0/ios/Classes/FlutterKeychainPlugin.m:95:49: values of type 'OSStatus' should not be used as format arguments; add an explicit cast to 'int' instead [-Wformat]
[10:24:26]: ▸             NSLog(@"SecItemUpdate status = %d", status);
[10:24:26]: ▸                                            ~~   ^~~~~~
[10:24:26]: ▸ ⚠️  /Users/me/.fluttersdk/.pub-cache/hosted/pub.dartlang.org/flutter_keychain-1.0.0/ios/Classes/FlutterKeychainPlugin.m:103:46: values of type 'OSStatus' should not be used as format arguments; add an explicit cast to 'int' instead [-Wformat]
[10:24:26]: ▸             NSLog(@"SecItemAdd status = %d", status);
[10:24:26]: ▸                                         ~~   ^~~~~~

Seems you can just cast it to (int) like they did in this project:

https://github.com/mogol/flutter_secure_storage/commit/eef67d3d006b2c53453df183f7d4ac081948e110

Pe-te commented 3 years ago

I made a pull request, please let me know if you need anything else!

jeroentrappers commented 3 years ago

Thanks for reporting and fixing this issue!