From patchwork Mon Jun 19 16:23:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 21109 Received: (qmail 101634 invoked by alias); 19 Jun 2017 16:23:18 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 101510 invoked by uid 89); 19 Jun 2017 16:23:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=20798 X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 04649145F83 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 04649145F83 Date: Mon, 19 Jun 2017 18:23:19 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] vfprintf: Remove unused argument from printf_unknown User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170619162319.1424E402AEC3C@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2017-06-19 Florian Weimer * stdio-common/vfprintf.c (printf_unknown): Remove unused argument. (printf_positional): Adjust. diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c index 0a5e541..9cd4683 100644 --- a/stdio-common/vfprintf.c +++ b/stdio-common/vfprintf.c @@ -1272,8 +1272,7 @@ static int printf_positional (_IO_FILE *s, const char *grouping, THOUSANDS_SEP_T); /* Handle unknown format specifier. */ -static int printf_unknown (FILE *, const struct printf_info *, - const void *const *) __THROW; +static int printf_unknown (FILE *, const struct printf_info *) __THROW; /* Group digits of number string. */ static CHAR_T *group_number (CHAR_T *, CHAR_T *, CHAR_T *, const char *, @@ -2035,19 +2034,8 @@ printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format, LABEL (form_unknown): { - unsigned int i; - const void **ptr; - - ptr = alloca (specs[nspecs_done].ndata_args - * sizeof (const void *)); - - /* Fill in an array of pointers to the argument values. */ - for (i = 0; i < specs[nspecs_done].ndata_args; ++i) - ptr[i] = &args_value[specs[nspecs_done].data_arg + i]; - /* Call the function. */ - function_done = printf_unknown (s, &specs[nspecs_done].info, - ptr); + function_done = printf_unknown (s, &specs[nspecs_done].info); /* If an error occurred we don't have information about # of chars. */ @@ -2079,8 +2067,7 @@ printf_positional (_IO_FILE *s, const CHAR_T *format, int readonly_format, /* Handle an unknown format specifier. This prints out a canonicalized representation of the format spec itself. */ static int -printf_unknown (FILE *s, const struct printf_info *info, - const void *const *args) +printf_unknown (FILE *s, const struct printf_info *info) { int done = 0;