From 600cdfef64026c017ec497e0a4a1dac06615af82 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 12 May 2026 10:10:48 +0100 Subject: [PATCH 1/2] Rename args to __args to avoid collision --- cpp2rust/converter/converter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp2rust/converter/converter.cpp b/cpp2rust/converter/converter.cpp index eb52928a..70cbabf7 100644 --- a/cpp2rust/converter/converter.cpp +++ b/cpp2rust/converter/converter.cpp @@ -1363,7 +1363,8 @@ std::optional Converter::TryPluginConvert(clang::CallExpr *call) { void Converter::ConvertVAArgCall(clang::CallExpr *expr) { if (IsBuiltinVaStart(expr)) { - StrCat(ToString(expr->getArg(0)->IgnoreImpCasts()), "= VaList::new(args)"); + StrCat(ToString(expr->getArg(0)->IgnoreImpCasts()), + "= VaList::new(__args)"); return; } if (IsBuiltinVaEnd(expr)) { @@ -3295,7 +3296,7 @@ void Converter::ConvertFunctionParameters(clang::FunctionDecl *decl) { StrCat(token::kComma); } if (decl->isVariadic()) { - StrCat("args: &[VaArg]", token::kComma); + StrCat("__args: &[VaArg]", token::kComma); } in_function_formals_ = false; } From 40c840c13a97cf85bb0da5f7de6cb560f99b8339 Mon Sep 17 00:00:00 2001 From: Lucian Popescu Date: Tue, 12 May 2026 10:10:59 +0100 Subject: [PATCH 2/2] Update tests --- tests/unit/out/refcount/va_arg_chain.rs | 4 ++-- tests/unit/out/refcount/va_arg_concat.rs | 8 ++++---- tests/unit/out/refcount/va_arg_conditional.rs | 4 ++-- tests/unit/out/refcount/va_arg_copy.rs | 4 ++-- tests/unit/out/refcount/va_arg_forward.rs | 4 ++-- tests/unit/out/refcount/va_arg_mixed_int_ptr.rs | 4 ++-- tests/unit/out/refcount/va_arg_mixed_types.rs | 4 ++-- tests/unit/out/refcount/va_arg_printf.rs | 4 ++-- tests/unit/out/refcount/va_arg_promotion.rs | 4 ++-- tests/unit/out/refcount/va_arg_snprintf.rs | 4 ++-- tests/unit/out/refcount/va_arg_struct_ctx.rs | 4 ++-- tests/unit/out/refcount/va_arg_two_passes.rs | 6 +++--- tests/unit/out/unsafe/va_arg_chain.rs | 4 ++-- tests/unit/out/unsafe/va_arg_concat.rs | 8 ++++---- tests/unit/out/unsafe/va_arg_conditional.rs | 4 ++-- tests/unit/out/unsafe/va_arg_copy.rs | 4 ++-- tests/unit/out/unsafe/va_arg_forward.rs | 4 ++-- tests/unit/out/unsafe/va_arg_mixed_int_ptr.rs | 4 ++-- tests/unit/out/unsafe/va_arg_mixed_types.rs | 4 ++-- tests/unit/out/unsafe/va_arg_printf.rs | 4 ++-- tests/unit/out/unsafe/va_arg_promotion.rs | 4 ++-- tests/unit/out/unsafe/va_arg_snprintf.rs | 4 ++-- tests/unit/out/unsafe/va_arg_struct_ctx.rs | 4 ++-- tests/unit/out/unsafe/va_arg_two_passes.rs | 6 +++--- tests/unit/va_arg_concat.c | 8 ++++---- 25 files changed, 58 insertions(+), 58 deletions(-) diff --git a/tests/unit/out/refcount/va_arg_chain.rs b/tests/unit/out/refcount/va_arg_chain.rs index 59436bcb..b4730218 100644 --- a/tests/unit/out/refcount/va_arg_chain.rs +++ b/tests/unit/out/refcount/va_arg_chain.rs @@ -25,10 +25,10 @@ pub fn middle_layer_1(n: i32, ap: VaList) -> i32 { extract_nth_0(_n, _ap) }); } -pub fn top_level_2(n: i32, args: &[VaArg]) -> i32 { +pub fn top_level_2(n: i32, __args: &[VaArg]) -> i32 { let n: Value = Rc::new(RefCell::new(n)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let result: Value = Rc::new(RefCell::new( ({ let _n: i32 = (*n.borrow()); diff --git a/tests/unit/out/refcount/va_arg_concat.rs b/tests/unit/out/refcount/va_arg_concat.rs index ed21fe8d..a6f12cf1 100644 --- a/tests/unit/out/refcount/va_arg_concat.rs +++ b/tests/unit/out/refcount/va_arg_concat.rs @@ -6,14 +6,14 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn sum_ints_0(first: i32, args: &[VaArg]) -> i32 { +pub fn sum_ints_0(first: i32, __args: &[VaArg]) -> i32 { let first: Value = Rc::new(RefCell::new(first)); - let ap: Value = Rc::new(RefCell::new(VaList::default())); + let args: Value = Rc::new(RefCell::new(VaList::default())); let total: Value = Rc::new(RefCell::new((*first.borrow()))); - (*ap.borrow_mut()) = VaList::new(args); + (*args.borrow_mut()) = VaList::new(__args); let val: Value = >::default(); 'loop_: while (((({ - (*val.borrow_mut()) = ((*ap.borrow_mut()).arg::()).clone(); + (*val.borrow_mut()) = ((*args.borrow_mut()).arg::()).clone(); (*val.borrow()) }) != 0) as i32) != 0) diff --git a/tests/unit/out/refcount/va_arg_conditional.rs b/tests/unit/out/refcount/va_arg_conditional.rs index 308d3746..011e3372 100644 --- a/tests/unit/out/refcount/va_arg_conditional.rs +++ b/tests/unit/out/refcount/va_arg_conditional.rs @@ -6,12 +6,12 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn conditional_log_0(verbose: i32, fmt: Ptr, args: &[VaArg]) -> i32 { +pub fn conditional_log_0(verbose: i32, fmt: Ptr, __args: &[VaArg]) -> i32 { let verbose: Value = Rc::new(RefCell::new(verbose)); let fmt: Value> = Rc::new(RefCell::new(fmt)); if ((*verbose.borrow()) != 0) { let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let result: Value = Rc::new(RefCell::new(((*ap.borrow_mut()).arg::()).clone())); return (*result.borrow()); } diff --git a/tests/unit/out/refcount/va_arg_copy.rs b/tests/unit/out/refcount/va_arg_copy.rs index ffca5e56..0a2c54ef 100644 --- a/tests/unit/out/refcount/va_arg_copy.rs +++ b/tests/unit/out/refcount/va_arg_copy.rs @@ -6,11 +6,11 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn sum_with_copy_0(count: i32, args: &[VaArg]) -> i32 { +pub fn sum_with_copy_0(count: i32, __args: &[VaArg]) -> i32 { let count: Value = Rc::new(RefCell::new(count)); let ap: Value = Rc::new(RefCell::new(VaList::default())); let aq: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); (*aq.borrow_mut()) = (*ap.borrow_mut()).clone(); let sum1: Value = Rc::new(RefCell::new(0)); let i: Value = Rc::new(RefCell::new(0)); diff --git a/tests/unit/out/refcount/va_arg_forward.rs b/tests/unit/out/refcount/va_arg_forward.rs index 37bc19b1..1c15c65c 100644 --- a/tests/unit/out/refcount/va_arg_forward.rs +++ b/tests/unit/out/refcount/va_arg_forward.rs @@ -17,10 +17,10 @@ pub fn inner_0(count: i32, ap: VaList) -> i32 { } return (*total.borrow()); } -pub fn outer_1(count: i32, args: &[VaArg]) -> i32 { +pub fn outer_1(count: i32, __args: &[VaArg]) -> i32 { let count: Value = Rc::new(RefCell::new(count)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let result: Value = Rc::new(RefCell::new( ({ let _count: i32 = (*count.borrow()); diff --git a/tests/unit/out/refcount/va_arg_mixed_int_ptr.rs b/tests/unit/out/refcount/va_arg_mixed_int_ptr.rs index af7426eb..7dee8068 100644 --- a/tests/unit/out/refcount/va_arg_mixed_int_ptr.rs +++ b/tests/unit/out/refcount/va_arg_mixed_int_ptr.rs @@ -6,10 +6,10 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn mixed_args_0(count: i32, args: &[VaArg]) -> i32 { +pub fn mixed_args_0(count: i32, __args: &[VaArg]) -> i32 { let count: Value = Rc::new(RefCell::new(count)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let total: Value = Rc::new(RefCell::new(0)); let i: Value = Rc::new(RefCell::new(0)); 'loop_: while ((((*i.borrow()) < (*count.borrow())) as i32) != 0) { diff --git a/tests/unit/out/refcount/va_arg_mixed_types.rs b/tests/unit/out/refcount/va_arg_mixed_types.rs index 5229dabe..a841fcfb 100644 --- a/tests/unit/out/refcount/va_arg_mixed_types.rs +++ b/tests/unit/out/refcount/va_arg_mixed_types.rs @@ -6,10 +6,10 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn sum_mixed_0(count: i32, args: &[VaArg]) -> i32 { +pub fn sum_mixed_0(count: i32, __args: &[VaArg]) -> i32 { let count: Value = Rc::new(RefCell::new(count)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let total: Value = Rc::new(RefCell::new(0)); let i: Value = Rc::new(RefCell::new(0)); 'loop_: while ((((*i.borrow()) < (*count.borrow())) as i32) != 0) { diff --git a/tests/unit/out/refcount/va_arg_printf.rs b/tests/unit/out/refcount/va_arg_printf.rs index 795486d4..9eaa7262 100644 --- a/tests/unit/out/refcount/va_arg_printf.rs +++ b/tests/unit/out/refcount/va_arg_printf.rs @@ -15,10 +15,10 @@ pub fn logf_impl_0(fmt: Ptr, ap: VaList) -> i32 { _lhs + ((*ap.borrow_mut()).arg::()).clone() }; } -pub fn logf_1(fmt: Ptr, args: &[VaArg]) -> i32 { +pub fn logf_1(fmt: Ptr, __args: &[VaArg]) -> i32 { let fmt: Value> = Rc::new(RefCell::new(fmt)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let result: Value = Rc::new(RefCell::new( ({ let _fmt: Ptr = (*fmt.borrow()).clone(); diff --git a/tests/unit/out/refcount/va_arg_promotion.rs b/tests/unit/out/refcount/va_arg_promotion.rs index ec379ac3..03a8e5be 100644 --- a/tests/unit/out/refcount/va_arg_promotion.rs +++ b/tests/unit/out/refcount/va_arg_promotion.rs @@ -6,10 +6,10 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn test_promotions_0(count: i32, args: &[VaArg]) -> i32 { +pub fn test_promotions_0(count: i32, __args: &[VaArg]) -> i32 { let count: Value = Rc::new(RefCell::new(count)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let a: Value = Rc::new(RefCell::new(((*ap.borrow_mut()).arg::()).clone())); let b: Value = Rc::new(RefCell::new(((*ap.borrow_mut()).arg::()).clone())); let c: Value = Rc::new(RefCell::new(((*ap.borrow_mut()).arg::()).clone())); diff --git a/tests/unit/out/refcount/va_arg_snprintf.rs b/tests/unit/out/refcount/va_arg_snprintf.rs index b6e2b3fc..d681d0c8 100644 --- a/tests/unit/out/refcount/va_arg_snprintf.rs +++ b/tests/unit/out/refcount/va_arg_snprintf.rs @@ -6,12 +6,12 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn extract_first_0(buf: Ptr, size: i32, fmt: Ptr, args: &[VaArg]) -> i32 { +pub fn extract_first_0(buf: Ptr, size: i32, fmt: Ptr, __args: &[VaArg]) -> i32 { let buf: Value> = Rc::new(RefCell::new(buf)); let size: Value = Rc::new(RefCell::new(size)); let fmt: Value> = Rc::new(RefCell::new(fmt)); let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let n: Value = Rc::new(RefCell::new(((*ap.borrow_mut()).arg::()).clone())); let __rhs = ((*n.borrow()) as u8); (*buf.borrow()).offset((0) as isize).write(__rhs); diff --git a/tests/unit/out/refcount/va_arg_struct_ctx.rs b/tests/unit/out/refcount/va_arg_struct_ctx.rs index 38281dd5..8ffe4650 100644 --- a/tests/unit/out/refcount/va_arg_struct_ctx.rs +++ b/tests/unit/out/refcount/va_arg_struct_ctx.rs @@ -12,12 +12,12 @@ pub struct context { pub last_error: Value, } impl ByteRepr for context {} -pub fn set_error_0(ctx: Ptr, fmt: Ptr, args: &[VaArg]) { +pub fn set_error_0(ctx: Ptr, fmt: Ptr, __args: &[VaArg]) { let ctx: Value> = Rc::new(RefCell::new(ctx)); let fmt: Value> = Rc::new(RefCell::new(fmt)); if ((*(*(*ctx.borrow()).upgrade().deref()).verbose.borrow()) != 0) { let ap: Value = Rc::new(RefCell::new(VaList::default())); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); (*(*(*ctx.borrow()).upgrade().deref()).last_error.borrow_mut()) = ((*ap.borrow_mut()).arg::()).clone(); } diff --git a/tests/unit/out/refcount/va_arg_two_passes.rs b/tests/unit/out/refcount/va_arg_two_passes.rs index 0023fcff..7e67a2e4 100644 --- a/tests/unit/out/refcount/va_arg_two_passes.rs +++ b/tests/unit/out/refcount/va_arg_two_passes.rs @@ -6,12 +6,12 @@ use std::io::prelude::*; use std::io::{Read, Seek, Write}; use std::os::fd::AsFd; use std::rc::{Rc, Weak}; -pub fn sum_then_product_0(first: i32, args: &[VaArg]) -> i32 { +pub fn sum_then_product_0(first: i32, __args: &[VaArg]) -> i32 { let first: Value = Rc::new(RefCell::new(first)); let ap: Value = Rc::new(RefCell::new(VaList::default())); let sum: Value = Rc::new(RefCell::new((*first.borrow()))); let product: Value = Rc::new(RefCell::new((*first.borrow()))); - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); let val: Value = >::default(); 'loop_: while (((({ (*val.borrow_mut()) = ((*ap.borrow_mut()).arg::()).clone(); @@ -21,7 +21,7 @@ pub fn sum_then_product_0(first: i32, args: &[VaArg]) -> i32 { { (*sum.borrow_mut()) += (*val.borrow()); } - (*ap.borrow_mut()) = VaList::new(args); + (*ap.borrow_mut()) = VaList::new(__args); 'loop_: while (((({ (*val.borrow_mut()) = ((*ap.borrow_mut()).arg::()).clone(); (*val.borrow()) diff --git a/tests/unit/out/unsafe/va_arg_chain.rs b/tests/unit/out/unsafe/va_arg_chain.rs index f35c2f7a..1d1b03cd 100644 --- a/tests/unit/out/unsafe/va_arg_chain.rs +++ b/tests/unit/out/unsafe/va_arg_chain.rs @@ -21,9 +21,9 @@ pub unsafe fn middle_layer_1(mut n: i32, mut ap: VaList) -> i32 { extract_nth_0(_n, _ap) }); } -pub unsafe fn top_level_2(mut n: i32, args: &[VaArg]) -> i32 { +pub unsafe fn top_level_2(mut n: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut result: i32 = (unsafe { let _n: i32 = n; let _ap: VaList = ap; diff --git a/tests/unit/out/unsafe/va_arg_concat.rs b/tests/unit/out/unsafe/va_arg_concat.rs index e3ead633..008ce7a7 100644 --- a/tests/unit/out/unsafe/va_arg_concat.rs +++ b/tests/unit/out/unsafe/va_arg_concat.rs @@ -6,13 +6,13 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn sum_ints_0(mut first: i32, args: &[VaArg]) -> i32 { - let mut ap: VaList = VaList::default(); +pub unsafe fn sum_ints_0(mut first: i32, __args: &[VaArg]) -> i32 { + let mut args: VaList = VaList::default(); let mut total: i32 = first; - ap = VaList::new(args); + args = VaList::new(__args); let mut val: i32 = 0_i32; 'loop_: while (((({ - val = ap.arg::(); + val = args.arg::(); val }) != (0)) as i32) != 0) diff --git a/tests/unit/out/unsafe/va_arg_conditional.rs b/tests/unit/out/unsafe/va_arg_conditional.rs index 218ac7b4..8c0cea8d 100644 --- a/tests/unit/out/unsafe/va_arg_conditional.rs +++ b/tests/unit/out/unsafe/va_arg_conditional.rs @@ -6,10 +6,10 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn conditional_log_0(mut verbose: i32, mut fmt: *const u8, args: &[VaArg]) -> i32 { +pub unsafe fn conditional_log_0(mut verbose: i32, mut fmt: *const u8, __args: &[VaArg]) -> i32 { if (verbose != 0) { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut result: i32 = ap.arg::(); return result; } diff --git a/tests/unit/out/unsafe/va_arg_copy.rs b/tests/unit/out/unsafe/va_arg_copy.rs index 40c92fcf..be25015a 100644 --- a/tests/unit/out/unsafe/va_arg_copy.rs +++ b/tests/unit/out/unsafe/va_arg_copy.rs @@ -6,10 +6,10 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn sum_with_copy_0(mut count: i32, args: &[VaArg]) -> i32 { +pub unsafe fn sum_with_copy_0(mut count: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); let mut aq: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); aq = ap.clone(); let mut sum1: i32 = 0; let mut i: i32 = 0; diff --git a/tests/unit/out/unsafe/va_arg_forward.rs b/tests/unit/out/unsafe/va_arg_forward.rs index b99a8c68..dde3359e 100644 --- a/tests/unit/out/unsafe/va_arg_forward.rs +++ b/tests/unit/out/unsafe/va_arg_forward.rs @@ -15,9 +15,9 @@ pub unsafe fn inner_0(mut count: i32, mut ap: VaList) -> i32 { } return total; } -pub unsafe fn outer_1(mut count: i32, args: &[VaArg]) -> i32 { +pub unsafe fn outer_1(mut count: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut result: i32 = (unsafe { let _count: i32 = count; let _ap: VaList = ap; diff --git a/tests/unit/out/unsafe/va_arg_mixed_int_ptr.rs b/tests/unit/out/unsafe/va_arg_mixed_int_ptr.rs index 65ade03b..f1a3569e 100644 --- a/tests/unit/out/unsafe/va_arg_mixed_int_ptr.rs +++ b/tests/unit/out/unsafe/va_arg_mixed_int_ptr.rs @@ -6,9 +6,9 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn mixed_args_0(mut count: i32, args: &[VaArg]) -> i32 { +pub unsafe fn mixed_args_0(mut count: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut total: i32 = 0; let mut i: i32 = 0; 'loop_: while ((((i) < (count)) as i32) != 0) { diff --git a/tests/unit/out/unsafe/va_arg_mixed_types.rs b/tests/unit/out/unsafe/va_arg_mixed_types.rs index 6aaf6eef..3e2c680a 100644 --- a/tests/unit/out/unsafe/va_arg_mixed_types.rs +++ b/tests/unit/out/unsafe/va_arg_mixed_types.rs @@ -6,9 +6,9 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn sum_mixed_0(mut count: i32, args: &[VaArg]) -> i32 { +pub unsafe fn sum_mixed_0(mut count: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut total: i32 = 0; let mut i: i32 = 0; 'loop_: while ((((i) < (count)) as i32) != 0) { diff --git a/tests/unit/out/unsafe/va_arg_printf.rs b/tests/unit/out/unsafe/va_arg_printf.rs index c5f99359..b6095c14 100644 --- a/tests/unit/out/unsafe/va_arg_printf.rs +++ b/tests/unit/out/unsafe/va_arg_printf.rs @@ -10,9 +10,9 @@ pub unsafe fn logf_impl_0(mut fmt: *const u8, mut ap: VaList) -> i32 { fmt; return ((ap.arg::()) + (ap.arg::())); } -pub unsafe fn logf_1(mut fmt: *const u8, args: &[VaArg]) -> i32 { +pub unsafe fn logf_1(mut fmt: *const u8, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut result: i32 = (unsafe { let _fmt: *const u8 = fmt; let _ap: VaList = ap; diff --git a/tests/unit/out/unsafe/va_arg_promotion.rs b/tests/unit/out/unsafe/va_arg_promotion.rs index 3318b250..ddae810c 100644 --- a/tests/unit/out/unsafe/va_arg_promotion.rs +++ b/tests/unit/out/unsafe/va_arg_promotion.rs @@ -6,9 +6,9 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn test_promotions_0(mut count: i32, args: &[VaArg]) -> i32 { +pub unsafe fn test_promotions_0(mut count: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut a: i32 = ap.arg::(); let mut b: i32 = ap.arg::(); let mut c: f64 = ap.arg::(); diff --git a/tests/unit/out/unsafe/va_arg_snprintf.rs b/tests/unit/out/unsafe/va_arg_snprintf.rs index 40ed2929..d071db72 100644 --- a/tests/unit/out/unsafe/va_arg_snprintf.rs +++ b/tests/unit/out/unsafe/va_arg_snprintf.rs @@ -10,10 +10,10 @@ pub unsafe fn extract_first_0( mut buf: *mut u8, mut size: i32, mut fmt: *const u8, - args: &[VaArg], + __args: &[VaArg], ) -> i32 { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); let mut n: i32 = ap.arg::(); (*buf.offset((0) as isize)) = (n as u8); return n; diff --git a/tests/unit/out/unsafe/va_arg_struct_ctx.rs b/tests/unit/out/unsafe/va_arg_struct_ctx.rs index 1ab0f430..e5df45ea 100644 --- a/tests/unit/out/unsafe/va_arg_struct_ctx.rs +++ b/tests/unit/out/unsafe/va_arg_struct_ctx.rs @@ -12,10 +12,10 @@ pub struct context { pub verbose: i32, pub last_error: i32, } -pub unsafe fn set_error_0(mut ctx: *mut context, mut fmt: *const u8, args: &[VaArg]) { +pub unsafe fn set_error_0(mut ctx: *mut context, mut fmt: *const u8, __args: &[VaArg]) { if ((*ctx).verbose != 0) { let mut ap: VaList = VaList::default(); - ap = VaList::new(args); + ap = VaList::new(__args); (*ctx).last_error = (ap.arg::()).clone(); } } diff --git a/tests/unit/out/unsafe/va_arg_two_passes.rs b/tests/unit/out/unsafe/va_arg_two_passes.rs index 14b8a910..932c3830 100644 --- a/tests/unit/out/unsafe/va_arg_two_passes.rs +++ b/tests/unit/out/unsafe/va_arg_two_passes.rs @@ -6,11 +6,11 @@ use std::collections::BTreeMap; use std::io::{Read, Seek, Write}; use std::os::fd::{AsFd, FromRawFd, IntoRawFd}; use std::rc::Rc; -pub unsafe fn sum_then_product_0(mut first: i32, args: &[VaArg]) -> i32 { +pub unsafe fn sum_then_product_0(mut first: i32, __args: &[VaArg]) -> i32 { let mut ap: VaList = VaList::default(); let mut sum: i32 = first; let mut product: i32 = first; - ap = VaList::new(args); + ap = VaList::new(__args); let mut val: i32 = 0_i32; 'loop_: while (((({ val = ap.arg::(); @@ -20,7 +20,7 @@ pub unsafe fn sum_then_product_0(mut first: i32, args: &[VaArg]) -> i32 { { sum += val; } - ap = VaList::new(args); + ap = VaList::new(__args); 'loop_: while (((({ val = ap.arg::(); val diff --git a/tests/unit/va_arg_concat.c b/tests/unit/va_arg_concat.c index 19f77ae7..fe79c37d 100644 --- a/tests/unit/va_arg_concat.c +++ b/tests/unit/va_arg_concat.c @@ -2,15 +2,15 @@ #include int sum_ints(int first, ...) { - va_list ap; + va_list args; int total = first; - va_start(ap, first); + va_start(args, first); int val; - while ((val = va_arg(ap, int)) != 0) { + while ((val = va_arg(args, int)) != 0) { total += val; } - va_end(ap); + va_end(args); return total; }