Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144372747
D15723.id43531.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D15723.id43531.diff
View Options
Index: lib/libpmc/Makefile
===================================================================
--- lib/libpmc/Makefile
+++ lib/libpmc/Makefile
@@ -7,6 +7,7 @@
INCS= pmc.h pmclog.h pmcformat.h
CFLAGS+= -I${.CURDIR}
+CWARNFLAGS.gcc+= -Wno-shadow
.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
Index: usr.sbin/pmc/Makefile
===================================================================
--- usr.sbin/pmc/Makefile
+++ usr.sbin/pmc/Makefile
@@ -5,7 +5,8 @@
.include <src.opts.mk>
PROG_CXX= pmc
MAN=
-CXXFLAGS+= -O0
+CXXFLAGS+= -O0 -std=c++14
+CWARNFLAGS.gcc+= -Wno-redundant-decls
LIBADD= kvm pmc m ncursesw pmcstat elf
Index: usr.sbin/pmc/cmd_pmc_filter.cc
===================================================================
--- usr.sbin/pmc/cmd_pmc_filter.cc
+++ usr.sbin/pmc/cmd_pmc_filter.cc
@@ -68,7 +68,6 @@
#include <libpmcstat.h>
#include "cmd_pmc.h"
-#include <iostream>
#include <string>
#include <unordered_map>
@@ -182,11 +181,11 @@
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 @@
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) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 9, 2:45 AM (18 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28528248
Default Alt Text
D15723.id43531.diff (1 KB)
Attached To
Mode
D15723: pmc gcc fixups
Attached
Detach File
Event Timeline
Log In to Comment