On Wed, Jan 28, 2026 at 2:34 PM Kiran P Das <[email protected]> wrote: > > xcalloc takes in arguments in the order (size_t nmemb, size_t size), > but in lto-plugin it was swapped. Both are equivalent since it's > multiplication, but this patch fixes the order to match the function > signature. > > lto-plugin/ChangeLog: > * lto-plugin.c (all_symbols_read_handler): Fix argument order > in xcalloc call
Ok, this fixes a warning that shows up while compiling lto-plugin. > > Signed-off-by: Kiran P Das <[email protected]> > --- > lto-plugin/lto-plugin.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c > index ee0be4c55a0..faf69fcbe72 100644 > --- a/lto-plugin/lto-plugin.c > +++ b/lto-plugin/lto-plugin.c > @@ -794,7 +794,7 @@ all_symbols_read_handler (void) > return LDPS_OK; > } > > - lto_argv = (char **) xcalloc (sizeof (char *), num_lto_args); > + lto_argv = (char **) xcalloc (num_lto_args, sizeof (char *)); > lto_arg_ptr = (const char **) lto_argv; > assert (lto_wrapper_argv); > > -- > 2.51.1 >
