Skip to content

Compiling NIO in Release Mode throws warnings #178

@helje5

Description

@helje5

Expected behavior

No warnings, clean compile.

Actual behavior

A set of warnings, no clean compile.

Compile Swift Module 'NIO' (47 sources)
/Users/helge/dev/Swift/SwiftXcode/Images/SwiftNIO_XcodeImage/.build/checkouts/swift-nio.git-3108475404973543938/Sources/NIO/EventLoopFuture.swift:316:25: warning: will never be executed
            if let me = eventLoop as? SelectableEventLoop {
                        ^
/Users/helge/dev/Swift/SwiftXcode/Images/SwiftNIO_XcodeImage/.build/checkouts/swift-nio.git-3108475404973543938/Sources/NIO/EventLoopFuture.swift:315:12: note: condition always evaluates to false
        if _isDebugAssertConfiguration() {
           ^
/Users/helge/dev/Swift/SwiftXcode/Images/SwiftNIO_XcodeImage/.build/checkouts/swift-nio.git-3108475404973543938/Sources/NIO/EventLoopFuture.swift:338:64: warning: will never be executed
        if _isDebugAssertConfiguration(), let eventLoop = self.eventLoop as? SelectableEventLoop {
                                                               ^
/Users/helge/dev/Swift/SwiftXcode/Images/SwiftNIO_XcodeImage/.build/checkouts/swift-nio.git-3108475404973543938/Sources/NIO/EventLoopFuture.swift:338:12: note: condition always evaluates to false
        if _isDebugAssertConfiguration(), let eventLoop = self.eventLoop as? SelectableEventLoop {
           ^
Compile Swift Module 'NIOTLS' (3 sources)
Compile Swift Module 'NIOHTTP1' (7 sources)
Compile Swift Module 'NIOOpenSSL' (11 sources)
Compile Swift Module 'MicroExpress' (7 sources)
/Users/helge/dev/Swift/SwiftXcode/Images/SwiftNIO_XcodeImage/.build/checkouts/MicroExpress.git-6340581023861930988/Sources/MicroExpress/Express.swift:23:26: warning: 'addHTTPServerHandlers(first:)' is deprecated: Please use configureHTTPServerPipeline
        channel.pipeline.addHTTPServerHandlers().then {
                         ^

Steps to reproduce

swift build -c release

SwiftNIO version/commit hash

1.2.1

Swift & OS version (output of swift --version && uname -a)

Apple Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Target: x86_64-apple-macosx10.9
Darwin ZeaPro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jan 11 22:59:40 PST 2018; root:xnu-3789.73.8~1/RELEASE_X86_64 x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions