Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ffi warning on failed to drop #893

Merged
merged 1 commit into from
Nov 1, 2021
Merged

Conversation

jimexist
Copy link
Member

@jimexist jimexist commented Oct 31, 2021

Which issue does this PR close?

Closes #.

Rationale for this change

fix ffi warning on failed to drop

warning: unused return value of `CString::from_raw` that must be used
   --> arrow/src/ffi.rs:135:5
    |
135 |     CString::from_raw(schema.format as *mut c_char);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
    = note: call `drop(from_raw(ptr))` if you intend to drop the `CString`

warning: unused return value of `CString::from_raw` that must be used
   --> arrow/src/ffi.rs:137:9
    |
137 |         CString::from_raw(schema.name as *mut c_char);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: call `drop(from_raw(ptr))` if you intend to drop the `CString`

What changes are included in this PR?

Are there any user-facing changes?

@github-actions github-actions bot added the arrow Changes to the arrow crate label Oct 31, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2021

Codecov Report

Merging #893 (826ba96) into master (2a0a4c3) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #893   +/-   ##
=======================================
  Coverage   82.31%   82.32%           
=======================================
  Files         168      168           
  Lines       48123    48123           
=======================================
+ Hits        39614    39615    +1     
+ Misses       8509     8508    -1     
Impacted Files Coverage Δ
arrow/src/ffi.rs 84.69% <100.00%> (ø)
parquet_derive/src/parquet_field.rs 65.98% <0.00%> (-0.23%) ⬇️
arrow/src/array/transform/mod.rs 85.47% <0.00%> (+0.13%) ⬆️
arrow/src/datatypes/datatype.rs 65.36% <0.00%> (+0.43%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a0a4c3...826ba96. Read the comment docs.

@jimexist jimexist merged commit f0451bb into apache:master Nov 1, 2021
@jimexist jimexist deleted the fix-ffi-warn branch November 1, 2021 10:46
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Aug 26, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Aug 27, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Sep 5, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Sep 5, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Sep 6, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
mcheshkov pushed a commit to cube-js/arrow-rs that referenced this pull request Sep 11, 2024
Can drop this after rebase on commit f0451bb, first released in 7.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants