Skip to content

Future completion in generated jni sources causes warnings #469

@ktoso

Description

@ktoso
/Users/ktoso/code/swift-java/Samples/SwiftJavaExtractJNISampleApp/.build/plugins/outputs/swiftjavaextractjnisampleapp/MySwiftLibrary/destination/JExtractSwiftPlugin/Sources/MySwiftLibraryModule+SwiftJava.swift:516:29: warning: result of call to function returning 'jboolean' (aka 'UInt8') is unused [#no-usage]
514 |       let swiftResult$ = await MySwiftLibrary.asyncString(input: String(fromJNI: input, in: environment))
515 |       environment = try! JavaVirtualMachine.shared().environment()
516 |       environment.interface.CallBooleanMethodA(environment, globalFuture, _JNIMethodIDCache.CompletableFuture.complete, [jvalue(l: swiftResult$.getJNIValue(in: environment))])
    |                             `- warning: result of call to function returning 'jboolean' (aka 'UInt8') is unused [#no-usage]

We should be ignoring this bool since we don't need to care here; alternatively we could assert on it.

cc @madsodgaard

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions