[libc-commits] [libc] [libc] Fix -Wshadow warnings in getopt.cpp (PR #196853)
via libc-commits
libc-commits at lists.llvm.org
Sun May 10 17:40:25 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Nico Weber (nico)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/196853.diff
1 Files Affected:
- (modified) libc/src/unistd/getopt.cpp (+3-3)
``````````diff
diff --git a/libc/src/unistd/getopt.cpp b/libc/src/unistd/getopt.cpp
index 6da47e73926cc..84b962d0cdda8 100644
--- a/libc/src/unistd/getopt.cpp
+++ b/libc/src/unistd/getopt.cpp
@@ -191,9 +191,9 @@ static GetoptContext ctx{&impl::optarg, &impl::optind, &impl::optopt,
#ifndef LIBC_COPT_PUBLIC_PACKAGING
// This is used exclusively in tests.
-void set_getopt_state(char **optarg, int *optind, int *optopt, unsigned *optpos,
- int *opterr, FILE *errstream) {
- ctx = {optarg, optind, optopt, optpos, opterr, errstream};
+void set_getopt_state(char **optarg_in, int *optind_in, int *optopt_in,
+ unsigned *optpos_in, int *opterr_in, FILE *errstream) {
+ ctx = {optarg_in, optind_in, optopt_in, optpos_in, opterr_in, errstream};
}
#endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/196853
More information about the libc-commits
mailing list