diff options
author | Elliott Hughes <enh@google.com> | 2014-06-04 09:00:25 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-06-04 09:00:25 -0700 |
commit | be8df2e7445968d503a59a0a15c9612a8fb991df (patch) | |
tree | e330ae77c97357278cc432bc92ba1b070cc88077 | |
parent | 38ed337c1343af1aa55487777ed80de6b0d33638 (diff) | |
download | bionic-be8df2e7445968d503a59a0a15c9612a8fb991df.zip bionic-be8df2e7445968d503a59a0a15c9612a8fb991df.tar.gz bionic-be8df2e7445968d503a59a0a15c9612a8fb991df.tar.bz2 |
Cherrypick upstream OpenBSD's vfwprintf.c revision 1.11.
revision 1.11
date: 2014/06/04 07:45:25; author: stsp; state: Exp; lines: +1 -7; commitid:
zJPRH5RUO224FmQu;
Remove assigned but unused local variables and macro from vfwprintf().
Found by Elliott @ google
ok mpi@
Change-Id: I716edc0c4d736a484a5317942de8e87bd8c6fd26
-rw-r--r-- | libc/Android.mk | 1 | ||||
-rw-r--r-- | libc/upstream-openbsd/lib/libc/stdio/vfwprintf.c | 8 |
2 files changed, 1 insertions, 8 deletions
diff --git a/libc/Android.mk b/libc/Android.mk index 526551e..2bc3b06 100644 --- a/libc/Android.mk +++ b/libc/Android.mk @@ -709,7 +709,6 @@ LOCAL_CFLAGS := \ $(libc_common_cflags) \ -Wno-sign-compare -Wno-uninitialized -Wno-unused-parameter \ -Werror \ - -Wno-error=unused-but-set-variable \ -I$(LOCAL_PATH)/upstream-openbsd/android/include \ -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/include \ -I$(LOCAL_PATH)/upstream-openbsd/lib/libc/gdtoa/ \ diff --git a/libc/upstream-openbsd/lib/libc/stdio/vfwprintf.c b/libc/upstream-openbsd/lib/libc/stdio/vfwprintf.c index 745b4d9..ef0ca43 100644 --- a/libc/upstream-openbsd/lib/libc/stdio/vfwprintf.c +++ b/libc/upstream-openbsd/lib/libc/stdio/vfwprintf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfwprintf.c,v 1.10 2014/05/03 12:36:45 deraadt Exp $ */ +/* $OpenBSD: vfwprintf.c,v 1.11 2014/06/04 07:45:25 stsp Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. * All rights reserved. @@ -324,9 +324,6 @@ __vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, __va_list ap) int realsz; /* field size expanded by dprec */ int size; /* size of converted field or string */ const char *xdigs; /* digits for %[xX] conversion */ -#define NIOV 8 - struct __suio uio; /* output information: summary */ - struct __siov iov[NIOV];/* ... and individual io vectors */ wchar_t buf[BUF]; /* buffer with space for digits of uintmax_t */ wchar_t ox[2]; /* space for 0x; ox[1] is either x, X, or \0 */ union arg *argtable; /* args, built due to positional arg */ @@ -463,9 +460,6 @@ __vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, __va_list ap) argtable = NULL; nextarg = 1; va_copy(orgap, ap); - uio.uio_iov = iov; - uio.uio_resid = 0; - uio.uio_iovcnt = 0; ret = 0; convbuf = NULL; |