WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@mcr
Copy link

@mcr mcr commented Dec 13, 2025

I don't quite understand how this is building/passing-CI.
Without this change, I get the following with rustc 1.92. I got this with previous versions of rustc.
(rustc 1.94-nightly also shows this problem, as did 1.93-nightly and 1.90)
[noting that: "feature[stmt_expr_attributes]" in src/lib.rs is not allowed without -nightly]

``
error: unused import: impl_mu_aliases> ] 73/74: tss-esapi
--> tss-esapi/src/traits.rs:182:16
|
182 | pub(crate) use impl_mu_aliases;
| ^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> tss-esapi/src/lib.rs:15:5
|
15 | unused,
| ^^^^^^
= note: `#[deny(unused_imports)]` implied by `#[deny(unused)]`

error: value assigned to ffi_data_handler is never read
--> tss-esapi/src/context/tpm_commands/object_commands/create_command_output.rs:85:9
|
85 | ffi_data_handler.ffi_creation_ticket_ptr = null_mut();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: maybe it is overwritten before being read?
= note: #[deny(unused_assignments)] implied by #[deny(unused)]

``

@mcr mcr force-pushed the unused-imports-traits branch from 7044c3a to 455b882 Compare December 13, 2025 00:43
@Superhepper
Copy link
Collaborator

Hrmm I will need to investigate what the problem could be because I have never seen this before and never had this problem.

@Superhepper
Copy link
Collaborator

For the CreateCommandOutputHandler the only thing that needs to be removed is ffi_data_handler.ffi_creation_ticket_ptr = null_mut();. I am not super happy about that class even though I am the one who created it. I think I was a little bit to zealous. It would be better if it could zeroize the pointer values on drop. Not sure if that is something that is possible.

For pub(crate) use impl_mu_aliases; just remove everything that has to do with that. Not sure why I added it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants