The following commit has been merged in the master branch:
commit 13ef51154413fde3662d90d125eed1c50bb7af40
Author: Mark Vitale <[email protected]>
Date: Wed Apr 7 22:50:13 2021 -0400
DARWIN: Use -Werror=objc-method-access for objc
The default Xcode compiler options are insufficient to fail the build if
a method is not found. For example, a typo in the name of method
'componentsJoinedByString' results in the following build warning:
/TaskUtil.m:70:62: warning: instance method '-componentsJoinedBySting:'
not found (return type defaults to 'id') [-Wobjc-method-access]
NSLog(@"Task failed: %@ %@ status:%d.", taskName,
[args componentsJoinedBySting:@", "], status);
Because this is only flagged as a warning, the build completes
successfully. When this code runs, the AFSBackgrounder merely logs a
runtime exception every time it passes through the erroneous code. This
is a silent failure, unless you happen to know how to check for
AFSBackgrounder log messages:
$ log show --predicate 'process=="AFSBackgrounder"'
Add compiler flag '-Werror=objc-method-access' to all of our xcode-built
project files to treat this case as an error instead of a warning, so
the build will fail.
[[email protected]: Update all xcode project files.]
Change-Id: I69a9f45deb6710a50590bd79daf07466332a6ad1
Reviewed-on: https://gerrit.openafs.org/14586
Tested-by: BuildBot <[email protected]>
Reviewed-by: Mark Vitale <[email protected]>
Reviewed-by: Cheyenne Wills <[email protected]>
Reviewed-by: Andrew Deason <[email protected]>
.../DARWIN/AFSPreference/OpenAFS.xcodeproj/project.pbxproj | 10 ++++++++++
.../AklogAuthPlugin/AklogAuthPlugin.xcodeproj/project.pbxproj | 4 ++++
src/platform/DARWIN/afscell/afscell.xcodeproj/project.pbxproj | 4 ++++
3 files changed, 18 insertions(+)
--
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs