From owner-svn-src-head@freebsd.org Mon Jun 11 16:09:56 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E2F1015366; Mon, 11 Jun 2018 16:09:55 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 880D76D29D; Mon, 11 Jun 2018 16:09:55 +0000 (UTC) (envelope-from rlibby@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 648361DA68; Mon, 11 Jun 2018 16:09:55 +0000 (UTC) (envelope-from rlibby@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5BG9to0038612; Mon, 11 Jun 2018 16:09:55 GMT (envelope-from rlibby@FreeBSD.org) Received: (from rlibby@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5BG9sD7038609; Mon, 11 Jun 2018 16:09:54 GMT (envelope-from rlibby@FreeBSD.org) Message-Id: <201806111609.w5BG9sD7038609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rlibby set sender to rlibby@FreeBSD.org using -f From: Ryan Libby Date: Mon, 11 Jun 2018 16:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334957 - in head: lib/libpmc usr.sbin/pmc X-SVN-Group: head X-SVN-Commit-Author: rlibby X-SVN-Commit-Paths: in head: lib/libpmc usr.sbin/pmc X-SVN-Commit-Revision: 334957 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 16:09:56 -0000 Author: rlibby Date: Mon Jun 11 16:09:54 2018 New Revision: 334957 URL: https://svnweb.freebsd.org/changeset/base/334957 Log: pmc gcc fixups Fix the build of lib/libpmc and usr.sbin/pmc for gcc on amd64. Reviewed by: mmacy Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D15723 Modified: head/lib/libpmc/Makefile head/usr.sbin/pmc/Makefile head/usr.sbin/pmc/cmd_pmc_filter.cc Modified: head/lib/libpmc/Makefile ============================================================================== --- head/lib/libpmc/Makefile Mon Jun 11 15:44:53 2018 (r334956) +++ head/lib/libpmc/Makefile Mon Jun 11 16:09:54 2018 (r334957) @@ -7,6 +7,7 @@ SRCS= libpmc.c pmclog.c libpmc_pmu_util.c libpmc_json. INCS= pmc.h pmclog.h pmcformat.h CFLAGS+= -I${.CURDIR} +CWARNFLAGS.gcc+= -Wno-shadow .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386" Modified: head/usr.sbin/pmc/Makefile ============================================================================== --- head/usr.sbin/pmc/Makefile Mon Jun 11 15:44:53 2018 (r334956) +++ head/usr.sbin/pmc/Makefile Mon Jun 11 16:09:54 2018 (r334957) @@ -5,7 +5,8 @@ .include PROG_CXX= pmc MAN= -CXXFLAGS+= -O0 +CXXFLAGS+= -O0 -std=c++14 +CWARNFLAGS.gcc+= -Wno-redundant-decls LIBADD= kvm pmc m ncursesw pmcstat elf Modified: head/usr.sbin/pmc/cmd_pmc_filter.cc ============================================================================== --- head/usr.sbin/pmc/cmd_pmc_filter.cc Mon Jun 11 15:44:53 2018 (r334956) +++ head/usr.sbin/pmc/cmd_pmc_filter.cc Mon Jun 11 16:09:54 2018 (r334957) @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include "cmd_pmc.h" -#include #include #include @@ -182,11 +181,11 @@ static void pmc_log_event(int fd, struct pmclog_ev *ev, bool json) { int len; - void *buf; + const void *buf; if (json) { string ret = event_to_json(ev); - buf = (void*)ret.c_str(); + buf = ret.c_str(); len = ret.size(); } else { len = ev->pl_len; @@ -233,7 +232,7 @@ pmc_filter_handler(uint32_t *lwplist, int lwpcount, ui pmclog_close(ps); if ((ps = static_cast < struct pmclog_parse_state *>(pmclog_open(infd)))== NULL) errx(EX_OSERR, "ERROR: Cannot allocate pmclog parse state: %s\n", strerror(errno)); - if ((pe = (typeof(pe)) malloc(sizeof(*pe) * pmccount)) == NULL) + if ((pe = (struct pmcid_ent *) malloc(sizeof(*pe) * pmccount)) == NULL) errx(EX_OSERR, "ERROR: failed to allocate pmcid map"); i = 0; while (pmclog_read(ps, &ev) == 0 && i < pmccount) {