mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Explicitly cast seconds to NSTimeInterval in TimeIntervalFromSecondsAndNanos.
This was causing an error in our Github tests (https://github.com/protocolbuffers/protobuf/actions/runs/23308413575/job/67788944664) after Github upgraded its Macos 14 runner images. This likely seems to be due to the upgrade to Clang/LLVM, though the release notes claim the error was actually made *weaker* in 15.0.1 https://reviews.llvm.org/D133800. Seems like https://github.com/actions/runner-images/issues/13827 is likely mistakenly causing this to surface, but this is an error in Clang16 so we should probably fix it anyways. PiperOrigin-RevId: 886846312
This commit is contained in:
parent
7f7b974fce
commit
28f94045e6
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ NSString *const GPBWellKnownTypesErrorDomain = GPBNSStringifySymbol(GPBWellKnown
|
|||
static NSString *kTypePrefixGoogleApisCom = @"type.googleapis.com/";
|
||||
|
||||
static NSTimeInterval TimeIntervalFromSecondsAndNanos(int64_t seconds, int32_t nanos) {
|
||||
return seconds + (NSTimeInterval)nanos / 1e9;
|
||||
return (NSTimeInterval)seconds + (NSTimeInterval)nanos / 1e9;
|
||||
}
|
||||
|
||||
static int32_t SecondsAndNanosFromTimeInterval(NSTimeInterval time, int64_t *outSeconds,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue