From owner-svn-src-all@FreeBSD.ORG Sun Mar 8 00:30:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EC8DF72; Sun, 8 Mar 2015 00:30:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 ED80FAC4; Sun, 8 Mar 2015 00:30:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t280UrXs063887; Sun, 8 Mar 2015 00:30:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t280UrIe063885; Sun, 8 Mar 2015 00:30:53 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503080030.t280UrIe063885@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 8 Mar 2015 00:30:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279760 - head/lib/libnv/tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2015 00:30:54 -0000 Author: dim Date: Sun Mar 8 00:30:52 2015 New Revision: 279760 URL: https://svnweb.freebsd.org/changeset/base/279760 Log: Fix lib/libnv tests compilation with -std=c++11, by adding appropriate casts for NULL to invocations of the ATF_REQUIER_EQ() macro. Reviewed by: rstone, jmmv Differential Revision: https://reviews.freebsd.org/D2027 Modified: head/lib/libnv/tests/dnv_tests.cc head/lib/libnv/tests/nv_tests.cc Modified: head/lib/libnv/tests/dnv_tests.cc ============================================================================== --- head/lib/libnv/tests/dnv_tests.cc Sat Mar 7 23:01:27 2015 (r279759) +++ head/lib/libnv/tests/dnv_tests.cc Sun Mar 8 00:30:52 2015 (r279760) @@ -450,7 +450,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_nvlist__ nvl = nvlist_create(0); actual_val = dnvlist_take_nvlist(nvl, "123", NULL); - ATF_REQUIRE_EQ(actual_val, NULL); + ATF_REQUIRE_EQ(actual_val, static_cast(NULL)); free(actual_val); nvlist_destroy(nvl); Modified: head/lib/libnv/tests/nv_tests.cc ============================================================================== --- head/lib/libnv/tests/nv_tests.cc Sat Mar 7 23:01:27 2015 (r279759) +++ head/lib/libnv/tests/nv_tests.cc Sun Mar 8 00:30:52 2015 (r279760) @@ -54,7 +54,7 @@ ATF_TEST_CASE_BODY(nvlist_create__is_emp ATF_REQUIRE(nvlist_empty(nvl)); it = NULL; - ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -85,7 +85,7 @@ ATF_TEST_CASE_BODY(nvlist_add_null__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NULL); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -118,7 +118,7 @@ ATF_TEST_CASE_BODY(nvlist_add_bool__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BOOL); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -153,7 +153,7 @@ ATF_TEST_CASE_BODY(nvlist_add_number__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -191,7 +191,7 @@ ATF_TEST_CASE_BODY(nvlist_add_string__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -237,7 +237,7 @@ ATF_TEST_CASE_BODY(nvlist_add_nvlist__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(sublist); nvlist_destroy(nvl); @@ -303,7 +303,7 @@ ATF_TEST_CASE_BODY(nvlist_add_binary__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BINARY); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); free(value); @@ -352,7 +352,7 @@ ATF_TEST_CASE_BODY(nvlist_clone__nonempt it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(clone, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(clone, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(clone, &type, &it), static_cast(NULL)); nvlist_destroy(clone); nvlist_destroy(nvl); @@ -400,13 +400,13 @@ verify_test_nvlist(const nvlist_t *nvl) ATF_REQUIRE_EQ(strcmp(nvlist_next(value, &type, &it), test_string_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(value, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(value, &type, &it), static_cast(NULL)); it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), test_subnvlist_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast(NULL)); } ATF_TEST_CASE_WITHOUT_HEAD(nvlist_clone__nested_nvlist);