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

Silence constant X is never used warings #3643

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

bzEq
Copy link
Contributor

@bzEq bzEq commented Apr 2, 2024

Fix warnings on AIX

warning: constant `IF_NAMESIZE` is never used
   --> src/unix/aix/mod.rs:964:11
    |
964 | pub const IF_NAMESIZE: ::c_int = 16;
    |           ^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: constant `IFNAMSIZ` is never used
   --> src/unix/aix/mod.rs:965:11
    |
965 | pub const IFNAMSIZ: ::c_int = 16;
    |           ^^^^^^^^

warning: constant `ARPOP_REQUEST` is never used
   --> src/unix/aix/mod.rs:988:11
    |
988 | pub const ARPOP_REQUEST: ::c_int = 1;
    |           ^^^^^^^^^^^^^

warning: constant `ARPOP_REPLY` is never used
   --> src/unix/aix/mod.rs:989:11
    |
989 | pub const ARPOP_REPLY: ::c_int = 2;
    |           ^^^^^^^^^^^

These constants have been defined in src/unix/mod.rs and have the same numeric values on AIX.

@rustbot
Copy link
Collaborator

rustbot commented Apr 2, 2024

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@JohnTitor
Copy link
Member

These warnings mean there are duplicate declarations for consts, so you have to remove or separate them (note that we re-export modules from lower to upper).

@bzEq bzEq force-pushed the unused-constants branch from 20291ff to 7825c9f Compare April 18, 2024 02:22
@JohnTitor JohnTitor added this pull request to the merge queue Apr 26, 2024
Merged via the queue into rust-lang:main with commit f1669fd Apr 26, 2024
41 checks passed
@tgross35 tgross35 added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Nov 18, 2024
tgross35 pushed a commit to tgross35/rust-libc that referenced this pull request Nov 18, 2024
(backport <rust-lang#3643>)
(cherry picked from commit 7825c9f)
[ slightly modify commit message - Trevor ]
@tgross35 tgross35 mentioned this pull request Nov 18, 2024
@tgross35 tgross35 added stable-applied This PR has been cherry-picked to libc's stable release branch and removed stable-nominated This PR should be considered for cherry-pick to libc's stable release branch labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review stable-applied This PR has been cherry-picked to libc's stable release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants