From owner-svn-src-stable@freebsd.org Sun Dec 13 04:29:10 2015 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BCF51A42BCE; Sun, 13 Dec 2015 04:29:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7534A117B; Sun, 13 Dec 2015 04:29:10 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tBD4T9g5087295; Sun, 13 Dec 2015 04:29:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBD4T9nI087292; Sun, 13 Dec 2015 04:29:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512130429.tBD4T9nI087292@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 13 Dec 2015 04:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r292152 - stable/10/lib/libc/tests/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Dec 2015 04:29:10 -0000 Author: ngie Date: Sun Dec 13 04:29:09 2015 New Revision: 292152 URL: https://svnweb.freebsd.org/changeset/base/292152 Log: MFC r291980,r291981: r291980: Add missing va_ends for corresponding va_starts to clean up variable arguments initialized in _test_fmt(..) Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division r291981: Delete bogus freeing of uninitialized data Reported by: cppcheck Sponsored by: EMC / Isilon Storage Division Modified: stable/10/lib/libc/tests/stdio/getdelim_test.c stable/10/lib/libc/tests/stdio/printbasic_test.c stable/10/lib/libc/tests/stdio/printfloat_test.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/stdio/getdelim_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/getdelim_test.c Sun Dec 13 04:24:59 2015 (r292151) +++ stable/10/lib/libc/tests/stdio/getdelim_test.c Sun Dec 13 04:29:09 2015 (r292152) @@ -208,7 +208,6 @@ ATF_TC_BODY(empty_NULL_buffer, tc) /* Make sure NULL *linep and zero *linecapp are handled. */ fp = mkfilebuf(); - free(line); line = NULL; linecap = 42; ATF_REQUIRE(getline(&line, &linecap, fp) == sizeof(apothegm) - 1); Modified: stable/10/lib/libc/tests/stdio/printbasic_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/printbasic_test.c Sun Dec 13 04:24:59 2015 (r292151) +++ stable/10/lib/libc/tests/stdio/printbasic_test.c Sun Dec 13 04:29:09 2015 (r292152) @@ -94,6 +94,8 @@ _testfmt(const char *result, const char "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", wfmt, argstr, ws, wresult); } + va_end(ap); + va_end(ap2); } ATF_TC_WITHOUT_HEAD(int_within_limits); Modified: stable/10/lib/libc/tests/stdio/printfloat_test.c ============================================================================== --- stable/10/lib/libc/tests/stdio/printfloat_test.c Sun Dec 13 04:24:59 2015 (r292151) +++ stable/10/lib/libc/tests/stdio/printfloat_test.c Sun Dec 13 04:29:09 2015 (r292152) @@ -86,6 +86,8 @@ _testfmt(const char *result, const char "wprintf(\"%ls\", %s) ==> [%ls], expected [%ls]\n", wfmt, argstr, ws, wresult); } + va_end(ap); + va_end(ap2); } ATF_TC_WITHOUT_HEAD(float_within_limits);