kou opened a new issue, #42087: URL: https://github.com/apache/arrow/issues/42087
### Describe the enhancement requested There are some build time warnings: https://github.com/apache/arrow/actions/runs/9449872504/job/26027172965?pr=42064#step:4:1110 ```text [64/82] Compiling Arrow ArrowArray.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ [65/82] Compiling Arrow ArrowArrayBuilder.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ [66/82] Compiling Arrow ArrowBuffer.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ [67/82] Compiling Arrow ArrowBufferBuilder.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ [68/82] Compiling Arrow ArrowCExporter.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ [69/82] Compiling Arrow ArrowCImporter.swift /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:28: warning: initialization of 'UnsafeMutablePointer<UnsafeRawPointer?>' results in a dangling pointer self.buffers = UnsafeMutablePointer(mutating: data) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: implicit argument conversion from '[UnsafeRawPointer?]' to 'UnsafePointer<UnsafeRawPointer?>' produces a pointer valid only for the duration of the call to 'init(mutating:)' self.buffers = UnsafeMutablePointer(mutating: data) ^~~~ /arrow/swift/Arrow/Sources/Arrow/ArrowCExporter.swift:67:59: note: use the 'withUnsafeBufferPointer' method on Array in order to explicitly convert argument to buffer pointer valid for a defined scope self.buffers = UnsafeMutablePointer(mutating: data) ^ ``` ```text [83/90] Compiling ArrowTests CodableTests.swift /arrow/swift/Arrow/Tests/ArrowTests/CodableTests.swift:101:17: warning: variable 'testClasses' was never mutated; consider changing to 'let' constant var testClasses = try decoder.decode(TestClass.self) ~~~ ^ let [84/90] Compiling ArrowTests IPCTests.swift /arrow/swift/Arrow/Tests/ArrowTests/CodableTests.swift:101:17: warning: variable 'testClasses' was never mutated; consider changing to 'let' constant var testClasses = try decoder.decode(TestClass.self) ~~~ ^ let ``` Can we treat build time warnings as errors in our CI to detect them easily? ### Component(s) Continuous Integration, Swift -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org