X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/ad3c9f2af814c84582fdd1649e49ec4f68572c5a..HEAD:/stdio/FreeBSD/vfscanf.c diff --git a/stdio/FreeBSD/vfscanf.c b/stdio/FreeBSD/vfscanf.c index a3f9f3e..eca2766 100644 --- a/stdio/FreeBSD/vfscanf.c +++ b/stdio/FreeBSD/vfscanf.c @@ -30,6 +30,9 @@ * SUCH DAMAGE. */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcomma" + #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)vfscanf.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ @@ -156,7 +159,7 @@ __svfscanf_l(FILE * __restrict fp, locale_t loc, const char * __restrict fmt0, v int mb_cur_max; /* `basefix' is used to avoid `if' tests in the integer scanner */ - static short basefix[17] = + static const short basefix[17] = { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; NORMALIZE_LOCALE(loc); @@ -326,8 +329,10 @@ literal: case 'n': { + if (flags & SUPPRESS) /* ??? */ + continue; void *ptr = va_arg(ap, void *); - if ((ptr == NULL) || (flags & SUPPRESS)) /* ??? */ + if (ptr == NULL) continue; else if (flags & SHORTSHORT) *(char *)ptr = nread; @@ -1192,3 +1197,4 @@ parsedone: return (commit - b); } #endif +#pragma clang diagnostic push