Skip to content

Commit d32abd8

Browse files
committed
Fix warning: will never be executed
1 parent d75acaa commit d32abd8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/System/IORing/IORing.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ import Musl
1010
#endif
1111
import Synchronization
1212

13+
private var ioringSupported: Bool {
14+
__SWIFT_IORING_SUPPORTED != 0
15+
}
16+
1317
//This was #defines in older headers, so we redeclare it to get a consistent import
1418
internal enum RegistrationOps: UInt32 {
1519
case registerBuffers = 0
@@ -366,7 +370,7 @@ public struct IORing: ~Copyable {
366370

367371
/// Initializes an IORing with enough space for `queueDepth` prepared requests and completed operations
368372
public init(queueDepth: UInt32, flags: SetupFlags = []) throws(Errno) {
369-
guard __SWIFT_IORING_SUPPORTED != 0 else {
373+
guard ioringSupported else {
370374
throw Errno.notSupported
371375
}
372376

0 commit comments

Comments
 (0)